FIX core-js alias

This commit is contained in:
Norbert de Langen 2018-12-03 14:53:49 +01:00
parent 94ae833636
commit aa84714966
No known key found for this signature in database
GPG Key ID: 976651DA156C2825
2 changed files with 2 additions and 2 deletions

View File

@ -58,7 +58,7 @@ export default ({ configDir, configType, entries, outputDir, cache }) => {
extensions: ['.mjs', '.js', '.jsx', '.json'], extensions: ['.mjs', '.js', '.jsx', '.json'],
modules: ['node_modules'].concat(raw.NODE_PATH || []), modules: ['node_modules'].concat(raw.NODE_PATH || []),
alias: { alias: {
'core-js': require.resolve('core-js'), 'core-js': path.dirname(require.resolve('core-js/package.json')),
react: require.resolve('react'), react: require.resolve('react'),
'react-dom': require.resolve('react-dom'), 'react-dom': require.resolve('react-dom'),
}, },

View File

@ -83,7 +83,7 @@ export default ({
modules: ['node_modules'].concat(raw.NODE_PATH || []), modules: ['node_modules'].concat(raw.NODE_PATH || []),
mainFields: ['browser', 'main', 'module'], mainFields: ['browser', 'main', 'module'],
alias: { alias: {
'core-js': require.resolve('core-js'), 'core-js': path.dirname(require.resolve('core-js/package.json')),
}, },
}, },
optimization: { optimization: {