summaryrefslogtreecommitdiff
path: root/vue.config.js
diff options
context:
space:
mode:
Diffstat (limited to 'vue.config.js')
-rw-r--r--vue.config.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/vue.config.js b/vue.config.js
index 881c6248..4b7c2924 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -1,3 +1,5 @@
+const CompressionPlugin = require("compression-webpack-plugin");
+
module.exports = {
devServer: {
proxy: {
@@ -14,6 +16,23 @@ module.exports = {
}
}
}
+ },
+ port: 8000
+ },
+ productionSourceMap: false,
+ configureWebpack: config => {
+ if (process.env.NODE_ENV === "production") {
+ config.plugins.push(
+ new CompressionPlugin({
+ deleteOriginalAssets: true
+ })
+ );
+ }
+ },
+ chainWebpack: config => {
+ if (process.env.NODE_ENV === "production") {
+ config.plugins.delete("prefetch");
+ config.plugins.delete("preload");
}
}
};