Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Commit

Permalink
fix: only enable buildRollupPluginCommonjs for vite server
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Jun 30, 2022
1 parent cc594b3 commit 7d39ac6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 3 additions & 0 deletions packages/vite/src/server.ts
Expand Up @@ -41,6 +41,9 @@ export async function buildServer (ctx: ViteBuildContext) {
'process.server': true,
'process.client': false
},
legacy: {
buildRollupPluginCommonjs: !ctx.nuxt.options.experimental.externalVue && !ctx.nuxt.options.dev
},
resolve: {
alias: {
'#build/plugins': resolve(ctx.nuxt.options.buildDir, 'plugins/server'),
Expand Down
3 changes: 0 additions & 3 deletions packages/vite/src/vite.ts
Expand Up @@ -29,9 +29,6 @@ export async function bundle (nuxt: Nuxt) {
nuxt,
config: vite.mergeConfig(
{
legacy: {
buildRollupPluginCommonjs: !nuxt.options.experimental.externalVue && !nuxt.options.dev
},
resolve: {
alias: {
...nuxt.options.alias,
Expand Down

0 comments on commit 7d39ac6

Please sign in to comment.