optimize build for esp32

This commit is contained in:
Thomas Ballmann 2020-04-11 11:20:33 +02:00
parent 19b76fd772
commit 72ab301495

View File

@ -1,3 +1,5 @@
const webpack = require('webpack');
module.exports = {
"outputDir": "../data/dist",
"filenameHashing": false,
@ -13,5 +15,19 @@ module.exports = {
changeOrigin: true
},
}
},
configureWebpack: config => {
if (process.env.NODE_ENV === 'production') {
// optimize build for esp32
return {
plugins: [
new webpack.optimize.LimitChunkCountPlugin({
maxChunks: 1
})
]
}
} else {
// mutate for development...
}
}
}