diff options
author | Ed Tanous <ed@tanous.net> | 2024-06-06 23:46:21 +0300 |
---|---|---|
committer | Paul Fertser <fercerpav@gmail.com> | 2024-06-10 11:58:39 +0300 |
commit | b1daec6097304525c712142962a315efb73cca35 (patch) | |
tree | 36b45eac5c34f90a2c3e591a0f32d9767feb9e4a | |
parent | 64a2ee946fe70f708f602fbdddf0789c60c2eeb3 (diff) | |
download | webui-vue-b1daec6097304525c712142962a315efb73cca35.tar.xz |
Disable index hashing in development mode
When in Dev server mode, we the webpack dev server isn't capable of
understanding wildcards, and that index.html, and index.<hash>.html are
the same thing.
Disable the index file hashing when in dev mode.
Tested:
Launched dev server without bmc present. Observed UI could be loaded
correctly.
Change-Id: Ie2d3bfe4af0117681cec8c92f93d7e278b2071f2
Signed-off-by: Ed Tanous <ed@tanous.net>
-rw-r--r-- | vue.config.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/vue.config.js b/vue.config.js index 01d48b94..c1dd2ec1 100644 --- a/vue.config.js +++ b/vue.config.js @@ -70,10 +70,12 @@ module.exports = { name: '[name].[contenthash:8].[ext]', }); config.plugins.delete('preload'); - config.plugin('html').tap((options) => { - options[0].filename = 'index.[hash:8].html'; - return options; - }); + if (process.env.NODE_ENV === 'production') { + config.plugin('html').tap((options) => { + options[0].filename = 'index.[hash:8].html'; + return options; + }); + } }, configureWebpack: (config) => { config.plugins.push( |