Skip to content

Commit

Permalink
Disable index hashing in development mode
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
edtanous authored and paulfertser committed Jun 10, 2024
1 parent 64a2ee9 commit b1daec6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit b1daec6

Please sign in to comment.