mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-26 07:32:01 +00:00
fix(vite): remove aliases from inline list (#1520)
This commit is contained in:
parent
07ad7254e6
commit
f78ec933fe
@ -25,19 +25,10 @@ function isExternal (opts: TransformOptions, id: string) {
|
||||
// Externals
|
||||
const ssrConfig = (opts.viteServer.config as any).ssr
|
||||
|
||||
// Vite's alias have two possible formats
|
||||
// https://vitejs.dev/config/#resolve-alias
|
||||
const alias = opts.viteServer.config.resolve.alias || {}
|
||||
const aliasKeys = Array.isArray(alias)
|
||||
? alias.map(i => i.find).filter(Boolean)
|
||||
: Object.keys(alias)
|
||||
|
||||
const externalOpts: ExternalsOptions = {
|
||||
inline: [
|
||||
/virtual:/,
|
||||
/\.ts$/,
|
||||
// Things like '~', '@', etc.
|
||||
...aliasKeys,
|
||||
...ExternalsDefaults.inline,
|
||||
...ssrConfig.noExternal
|
||||
],
|
||||
|
Loading…
Reference in New Issue
Block a user