Skip to content

Commit

Permalink
fix: special handling for ssr.noExternal in mergeConfig (#4766)
Browse files Browse the repository at this point in the history
  • Loading branch information
frandiox committed Aug 30, 2021
1 parent bf0b631 commit 689a2c8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 12 additions & 1 deletion packages/playground/ssr-webworker/vite.config.js
Expand Up @@ -8,5 +8,16 @@ module.exports = {
ssr: {
target: 'webworker',
noExternal: true
}
},
plugins: [
{
config() {
return {
ssr: {
noExternal: ['this-should-not-replace-the-boolean']
}
}
}
}
]
}
2 changes: 2 additions & 0 deletions packages/vite/src/node/config.ts
Expand Up @@ -657,6 +657,8 @@ function mergeConfigRecursively(
} else if (key === 'assetsInclude' && rootPath === '') {
merged[key] = [].concat(existing, value)
continue
} else if (key === 'noExternal' && existing === true) {
continue
}
}

Expand Down

0 comments on commit 689a2c8

Please sign in to comment.