Skip to content

Commit

Permalink
fix: ssr.noExternal with boolean values (#7813)
Browse files Browse the repository at this point in the history
  • Loading branch information
frandiox committed Apr 20, 2022
1 parent fde54c9 commit 0b2d307
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
11 changes: 10 additions & 1 deletion packages/playground/ssr-webworker/vite.config.js
Expand Up @@ -10,9 +10,18 @@ module.exports = {
},
ssr: {
target: 'webworker',
noExternal: true
noExternal: ['this-should-be-replaced-by-the-boolean']
},
plugins: [
{
config() {
return {
ssr: {
noExternal: true
}
}
}
},
{
config() {
return {
Expand Down
3 changes: 2 additions & 1 deletion packages/vite/src/node/config.ts
Expand Up @@ -745,7 +745,8 @@ function mergeConfigRecursively(
} else if (key === 'assetsInclude' && rootPath === '') {
merged[key] = [].concat(existing, value)
continue
} else if (key === 'noExternal' && existing === true) {
} else if (key === 'noExternal' && (existing === true || value === true)) {
merged[key] = true
continue
}

Expand Down

0 comments on commit 0b2d307

Please sign in to comment.