Created
June 26, 2017 16:49
-
-
Save AndrewSouthpaw/81e720deda025ef128dc65cbc40e3e7f to your computer and use it in GitHub Desktop.
Trying to use explicit vendor chunks.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// foobar.js | |
import _ from 'lodash' | |
console.log(_.map([1, 2, 3], x => x + 1)) | |
// webpack.config.js | |
// ...snip... | |
entry: { | |
common: ['lodash'], | |
'foobar': './foobar.js', | |
}, | |
plugins: [ | |
new webpack.optimize.CommonsChunkPlugin({ | |
name: 'common', | |
minSize: Infinity, | |
}), | |
] | |
// ...snip... | |
// Output | |
Version: webpack 2.6.1 | |
Time: 2369ms | |
Asset Size Chunks Chunk Names | |
foobar.js 2.29 MB 0 [emitted] [big] foobar | |
common.js 2.29 MB 1 [emitted] [big] common |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment