diff --git a/examples/vue-ssr-extra/vite.config.ts b/examples/vue-ssr-extra/vite.config.ts index ee9ba8e..baa39be 100644 --- a/examples/vue-ssr-extra/vite.config.ts +++ b/examples/vue-ssr-extra/vite.config.ts @@ -39,6 +39,7 @@ export default defineConfig((_env) => ({ workerd: { resolve: { noExternal: true, + conditions: ["module"], }, build: { outDir: "dist/server", diff --git a/examples/vue-ssr/vite.config.workerd.ts b/examples/vue-ssr/vite.config.workerd.ts index 6e1f602..59e1ec9 100644 --- a/examples/vue-ssr/vite.config.workerd.ts +++ b/examples/vue-ssr/vite.config.workerd.ts @@ -21,6 +21,7 @@ export default defineConfig((_env) => ({ environments: { workerd: { resolve: { + conditions: ["module"], noExternal: true, }, }, diff --git a/packages/workerd/src/plugin.ts b/packages/workerd/src/plugin.ts index 2ef0549..d2c7451 100644 --- a/packages/workerd/src/plugin.ts +++ b/packages/workerd/src/plugin.ts @@ -37,6 +37,7 @@ export function vitePluginWorkerd(pluginOptions: WorkerdPluginOptions): Plugin { return { environments: { workerd: { + keepProcessEnv: false, optimizeDeps: { // prevent `import { createRequire } from "node:module"` esbuildOptions: {