Skip to content

Commit 3a5d125

Browse files
committed
fix: fix core-js import for global service
fix #837
1 parent 90310be commit 3a5d125

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/@vue/cli-service-global/lib/globalConfigPlugin.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ module.exports = function createConfigPlugin (context, entry, asLib) {
2020
}
2121
}
2222

23+
// ensure core-js polyfills can be imported
24+
config.resolve
25+
.alias
26+
.set('core-js', path.dirname(require.resolve('core-js')))
27+
2328
// ensure loaders can be resolved properly
2429
// this is done by locating vue's install location (which is a
2530
// dependency of the global service)

0 commit comments

Comments
 (0)