DEICH-6325 - Upgrade to WebPack 5 + cache busting 馃殌
-
Upgraded to webpack 5
馃帀 - Fixed module reload for WebPack 5, however could only make it work with sockjs.
- Added automatic cleanup for
public
folder - otherwise it gets full with different bundle cache busted bundle versions.
-
Added cache busting
馃帀 - The webpack config was modified to add
contenthash
to the generated bundle names (both js, and css). HtmlWebpackPlugin is used to generate public/index.html based on template stored in./assets/index.html
. -
global.css
was moved inside thesrc/css
folder, and now included inApp.svelte
. All declarations were converted to have global scope. This was required to avoid cachingglobal.css
, thus invalidating cache busting partially.
- The webpack config was modified to add
Closes DEICH-6325
Edited by Tom Adam