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:
parent
b598b428b4
commit
2ddb9ebd4a
@ -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
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user