diff --git a/packages/playground/ssr-webworker/vite.config.js b/packages/playground/ssr-webworker/vite.config.js index d0e80179498685..82fdf7579e9752 100644 --- a/packages/playground/ssr-webworker/vite.config.js +++ b/packages/playground/ssr-webworker/vite.config.js @@ -8,5 +8,16 @@ module.exports = { ssr: { target: 'webworker', noExternal: true - } + }, + plugins: [ + { + config() { + return { + ssr: { + noExternal: ['this-should-not-replace-the-boolean'] + } + } + } + } + ] } diff --git a/packages/vite/src/node/config.ts b/packages/vite/src/node/config.ts index 539b26205d0bc6..19274a725d785a 100644 --- a/packages/vite/src/node/config.ts +++ b/packages/vite/src/node/config.ts @@ -657,6 +657,8 @@ function mergeConfigRecursively( } else if (key === 'assetsInclude' && rootPath === '') { merged[key] = [].concat(existing, value) continue + } else if (key === 'noExternal' && existing === true) { + continue } }