summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Tanous <etanous@nvidia.com>2024-07-17 20:42:38 +0300
committerEd Tanous <ed@tanous.net>2024-10-03 21:34:06 +0300
commita6c682cb5d747e74fd0a9ad5b795020e83a1a5bf (patch)
tree3fdbb14331a7802064461ec17c9f7bbe1f6b65e9
parentf74cbab0caa27d96a2899e71b9ec261653e98843 (diff)
downloadwebui-vue-a6c682cb5d747e74fd0a9ad5b795020e83a1a5bf.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) =>