mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-12-28 17:51:16 +01:00
Split vendor code into separate bundle
This commit is contained in:
parent
dec1233a6d
commit
0c59b441ed
1 changed files with 21 additions and 3 deletions
|
@ -24,9 +24,26 @@ loaders.push({
|
||||||
});
|
});
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
entry: [
|
entry: {
|
||||||
'./src/index.jsx'
|
app: './src/index.jsx',
|
||||||
],
|
vendor: [
|
||||||
|
'file-saver',
|
||||||
|
'immutable',
|
||||||
|
'mapbox-gl',
|
||||||
|
//TODO: Cannot resolve migrations file?
|
||||||
|
//"mapbox-gl-style-spec",
|
||||||
|
"randomcolor",
|
||||||
|
'react',
|
||||||
|
"react-collapse",
|
||||||
|
"react-dom",
|
||||||
|
"react-file-reader-input",
|
||||||
|
"react-height",
|
||||||
|
//TODO: Icons raise multi vendor errors?
|
||||||
|
//"react-icons",
|
||||||
|
"react-motion",
|
||||||
|
"rebass",
|
||||||
|
]
|
||||||
|
},
|
||||||
output: {
|
output: {
|
||||||
path: path.join(__dirname, 'public'),
|
path: path.join(__dirname, 'public'),
|
||||||
filename: '[chunkhash].js'
|
filename: '[chunkhash].js'
|
||||||
|
@ -52,6 +69,7 @@ module.exports = {
|
||||||
fs: "empty"
|
fs: "empty"
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
|
new webpack.optimize.CommonsChunkPlugin('vendor', 'vendor.bundle.js'),
|
||||||
new WebpackCleanupPlugin(),
|
new WebpackCleanupPlugin(),
|
||||||
new webpack.DefinePlugin({
|
new webpack.DefinePlugin({
|
||||||
'process.env': {
|
'process.env': {
|
||||||
|
|
Loading…
Reference in a new issue