You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
906 B
JavaScript

const webpack = require('webpack')
const CompressionPlugin = require('compression-webpack-plugin')
module.exports = {
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...
}
},
}