mirror of
https://github.com/digitalocean/nginxconfig.io.git
synced 2025-08-08 16:17:57 +08:00
Move to using vue-cli-service instead of parcel (2.1MB to 850KB)
This commit is contained in:
21
vue.config.js
Normal file
21
vue.config.js
Normal file
@@ -0,0 +1,21 @@
|
||||
const path = require('path');
|
||||
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
|
||||
|
||||
module.exports = {
|
||||
publicPath: './',
|
||||
outputDir: 'dist',
|
||||
filenameHashing: false,
|
||||
productionSourceMap: false,
|
||||
configureWebpack: {
|
||||
plugins: [
|
||||
process.argv.includes('--analyze') && new BundleAnalyzerPlugin(),
|
||||
].filter(x => !!x),
|
||||
},
|
||||
chainWebpack: config => {
|
||||
// Use a custom HTML template
|
||||
config.plugin('html').tap(options => {
|
||||
options[0].template = path.join(__dirname, 'build', 'index.html');
|
||||
return options;
|
||||
});
|
||||
},
|
||||
}
|
Reference in New Issue
Block a user