Update vue.config.js for vue3
Vue3 has deprecated "hash" and recommends moving to contenthash. Also
remove source maps when not in development mode, so the build fits on
the bmc again.
Change-Id: I55b480d9b722c22b3670b19ec699a76fce07d1a5
Signed-off-by: Ed Tanous <etanous@nvidia.com>
diff --git a/vue.config.js b/vue.config.js
index ba7d7c0..e33918e 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -45,7 +45,7 @@
config.plugins.delete('preload');
if (process.env.NODE_ENV === 'production') {
config.plugin('html').tap((options) => {
- options[0].filename = 'index.[hash:8].html';
+ options[0].filename = 'index.[contenthash:8].html';
return options;
});
}
@@ -61,7 +61,9 @@
default: false,
},
};
- config.devtool = 'source-map';
+ if (process.env.NODE_ENV === 'development') {
+ config.devtool = 'source-map';
+ }
const crypto = require('crypto');
const crypto_orig_createHash = crypto.createHash;
crypto.createHash = (algorithm) =>