fix(vite): handle non-iterable noExternal option (#19256)

This commit is contained in:
Daniel Roe 2023-02-27 16:13:59 +01:00 committed by GitHub
parent f16cce8824
commit 57b8ff5b6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,7 +8,7 @@ export function createIsExternal (viteServer: ViteDevServer, rootDir: string) {
/virtual:/, /virtual:/,
/\.ts$/, /\.ts$/,
...ExternalsDefaults.inline || [], ...ExternalsDefaults.inline || [],
...viteServer.config.ssr.noExternal as string[] ...Array.isArray(viteServer.config.ssr.noExternal) ? viteServer.config.ssr.noExternal : []
], ],
external: [ external: [
...viteServer.config.ssr.external || [], ...viteServer.config.ssr.external || [],