device-epd/app/vue.config.js

40 lines
906 B
JavaScript
Raw Normal View History

2020-10-25 18:45:28 +00:00
const webpack = require('webpack')
const CompressionPlugin = require('compression-webpack-plugin')
2020-04-11 09:20:33 +00:00
module.exports = {
2020-10-25 18:45:28 +00:00
outputDir: '../data/dist',
filenameHashing: false,
productionSourceMap: false,
transpileDependencies: [
'vuetify',
],
devServer: {
proxy: {
'^/': {
target: 'http://paperdash-display-2:80',
ws: true,
changeOrigin: true,
},
},
},
configureWebpack: config => {
if (process.env.NODE_ENV === 'production') {
// optimize build for esp32
return {
plugins: [
// reduce total size of the app
new webpack.optimize.LimitChunkCountPlugin({
maxChunks: 1,
}),
// use only pre compressed files
new CompressionPlugin({
deleteOriginalAssets: true,
}),
],
}
} else {
// mutate for development...
}
},
}