Depend on script dependencies for downstream webpack
Downstream webpack will need any dependencies src/ depends on so it can successfully build. Also if multiple packages being built into a larger script share a common dependency version range, they can share the dependency instead of duplicating it. This will save built file size, execution time, and memory.
This commit is contained in:
committed by
Ray Schamp
parent
d7e39a35d7
commit
9b869e0da7
@@ -21,10 +21,6 @@ const base = {
|
||||
options: {
|
||||
presets: [['env', {targets: {browsers: ['last 3 versions', 'Safari >= 8', 'iOS >= 8']}}]]
|
||||
}
|
||||
},
|
||||
{
|
||||
test: /node_modules[\\/](linebreak|grapheme-breaker)[\\/].*\.js$/,
|
||||
loader: 'ify-loader'
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -84,6 +80,14 @@ module.exports = [
|
||||
libraryTarget: 'commonjs2',
|
||||
path: path.resolve('dist', 'node'),
|
||||
filename: '[name].js'
|
||||
},
|
||||
externals: {
|
||||
'!ify-loader!grapheme-breaker': 'grapheme-breaker',
|
||||
'!ify-loader!linebreak': 'linebreak',
|
||||
'hull.js': true,
|
||||
'scratch-svg-renderer': true,
|
||||
'twgl.js': true,
|
||||
'xml-escape': true
|
||||
}
|
||||
})
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user