48 lines
1.1 KiB
JavaScript
48 lines
1.1 KiB
JavaScript
const webpack = require('webpack');
|
|
|
|
module.exports = {
|
|
lintOnSave: false,
|
|
chainWebpack(config) {
|
|
// Vue CLI 4's Terser disk cache hashes with MD4, unavailable in modern Node.
|
|
// Disabling this cache preserves minification without enabling legacy crypto.
|
|
if (process.env.NODE_ENV === 'production') {
|
|
config.optimization.minimizer('terser').tap(args => {
|
|
args[0].cache = false;
|
|
return args;
|
|
});
|
|
}
|
|
},
|
|
configureWebpack: {
|
|
// Set up all the aliases we use in our app.
|
|
resolve: {
|
|
alias: {
|
|
'chart.js': 'chart.js/dist/Chart.js'
|
|
}
|
|
},
|
|
plugins: [
|
|
new webpack.optimize.LimitChunkCountPlugin({
|
|
maxChunks: 6
|
|
})
|
|
]
|
|
},
|
|
pwa: {
|
|
name: 'METACU PM Control Center',
|
|
themeColor: '#101722',
|
|
msTileColor: '#101722',
|
|
appleMobileWebAppCapable: 'yes',
|
|
appleMobileWebAppStatusBarStyle: '#344675'
|
|
},
|
|
pluginOptions: {
|
|
i18n: {
|
|
locale: 'en',
|
|
fallbackLocale: 'en',
|
|
localeDir: 'locales',
|
|
enableInSFC: false
|
|
}
|
|
},
|
|
css: {
|
|
// Enable CSS source maps.
|
|
sourceMap: process.env.NODE_ENV !== 'production'
|
|
}
|
|
};
|