mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-26 07:32:01 +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