Load OL3 code only once we need it

This commit is contained in:
Lukas Martinelli
2016-12-22 18:08:42 +01:00
parent 607e920548
commit 3ee1473a49
8 changed files with 123 additions and 46 deletions
+13 -7
View File
@@ -28,26 +28,32 @@ module.exports = {
app: './src/index.jsx',
vendor: [
'file-saver',
'immutable',
'mapbox-gl',
//TODO: Cannot resolve migrations file?
//TODO: Build failure because cannot resolve migrations file
//"mapbox-gl-style-spec",
"radium",
"randomcolor",
"lodash.clonedeep",
"lodash.throttle",
"lodash.topairs",
'color',
'react',
"react-dom",
"react-color",
"react-file-reader-input",
"react-collapse",
"react-height",
"react-icon-base",
"react-motion",
"react-sortable-hoc",
"request",
//TODO: Icons raise multi vendor errors?
//"react-icons",
// Open Layers
'openlayers',
'ol-mapbox-style'
]
},
output: {
path: path.join(__dirname, 'public'),
filename: '[chunkhash].app.js'
filename: '[name].[chunkhash].js',
chunkFilename: '[chunkhash].js'
},
resolve: {
alias: {