mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
fix(vite): ensure id is javascript before externalizing (#983)
This commit is contained in:
parent
07086c8397
commit
ad4e2e98d9
@ -29,6 +29,10 @@ function isExternal (opts: TransformOptions, id: string) {
|
||||
|
||||
const ssrConfig = (opts.viteServer.config as any).ssr
|
||||
|
||||
if (!/\.[cm]?js/.test(id)) {
|
||||
return false
|
||||
}
|
||||
|
||||
if (ssrConfig.noExternal.find(ext => id.includes(ext))) {
|
||||
return false
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user