fix(vite): external modules under/esm/ pattern (#1949)

Co-authored-by: Ben <bencodezen@users.noreply.github.com>
Co-authored-by: pooya parsa <pyapar@gmail.com>
This commit is contained in:
Anthony Fu 2021-11-16 21:28:29 +08:00 committed by GitHub
parent bf0933a2f0
commit 86a47a2fea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -42,6 +42,7 @@ export async function buildServer (ctx: ViteBuildContext) {
noExternal: [ noExternal: [
...ctx.nuxt.options.build.transpile, ...ctx.nuxt.options.build.transpile,
// TODO: Use externality for production (rollup) build // TODO: Use externality for production (rollup) build
/\/esm\/.*\.js$/,
/\.(es|esm|esm-browser|esm-bundler).js$/, /\.(es|esm|esm-browser|esm-bundler).js$/,
'/__vue-jsx', '/__vue-jsx',
'#app', '#app',