1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-23 01:39:36 +01:00

Add webpack resolve aliasing to dedupe packages installed through npm link

This commit is contained in:
Brett Sun 2016-06-24 13:46:09 +02:00
parent b598b428b4
commit 2ddb9ebd4a

View File

@ -209,6 +209,16 @@ const config = {
devtool: PRODUCTION ? '#source-map' : '#inline-source-map', devtool: PRODUCTION ? '#source-map' : '#inline-source-map',
resolve: { resolve: {
// Dedupe any dependencies' polyfill, react, or react-css-modules dependencies when
// developing with npm link
alias: {
'babel-runtime': path.resolve(PATHS.NODE_MODULES, 'babel-runtime'),
'core-js': path.resolve(PATHS.NODE_MODULES, 'core-js'),
'js-utility-belt': path.resolve(PATHS.NODE_MODULES, 'js-utility-belt'),
'react': path.resolve(PATHS.NODE_MODULES, 'react'),
'react-dom': path.resolve(PATHS.NODE_MODULES, 'react-dom'),
'react-css-modules': path.resolve(PATHS.NODE_MODULES, 'react-css-modules'),
},
extensions: ['', '.js', '.jsx'], extensions: ['', '.js', '.jsx'],
modules: ['node_modules'], // Don't use absolute path here to allow recursive matching modules: ['node_modules'], // Don't use absolute path here to allow recursive matching
}, },