summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Tanous <etanous@nvidia.com>2024-07-17 20:42:38 +0300
committerEd Tanous <ed@tanous.net>2024-07-18 19:36:44 +0300
commit01aeaf04086f8eef776f9c84e0a59445bcca170c (patch)
tree78f5453b02bd4bcdd25bbfa9648b855d3d0c70cf
parente9de649847da25735ca0fe7040a1e5ad47e50c61 (diff)
downloadwebui-vue-01aeaf04086f8eef776f9c84e0a59445bcca170c.tar.xz
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>
-rw-r--r--vue.config.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/vue.config.js b/vue.config.js
index ba7d7c02..e33918e4 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -45,7 +45,7 @@ module.exports = {
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 @@ module.exports = {
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) =>