So, as I was saying in my issue, there is a bug that left some users stuck with the old version (Venti banner) instead of the new one (Klee banner) unless they do a hard reset or cleared their cache.
This PR contains:
A new dependency called HTMLWebpackPlugin that allows us to create unique hashes on our main.js file every time we built the app. Because of the way browsers are designed, using unique hashes should actually force users to use the new version of the app instead of the old one.
A function to clear the user's local storage every time the version number is bumped / changed. I noticed that you changed the data of the Venti banner in the local storage to be the Klee one, so I believe resetting the local storage every time the version number is bumped is harmless (as people will lose their Venti banner history anyways).
Added a template for the HTMLWebpackPlugin according to your dist/index.html file.
I also recompiled the build script, this time with hashes to prevent said bug (just run npm run build to produce different hashes).
Nothing is actually changed for the general flow of the application, I just fixed the bug.
As a note, every time a new banner is released, we have to update the version number in the package.json file, so when users access the gacha simulator, they will be updated instantly with the new banner, instead of being stuck with the old one.
So, as I was saying in my issue, there is a bug that left some users stuck with the old version (Venti banner) instead of the new one (Klee banner) unless they do a hard reset or cleared their cache.
This PR contains:
HTMLWebpackPlugin
that allows us to create unique hashes on ourmain.js
file every time we built the app. Because of the way browsers are designed, using unique hashes should actually force users to use the new version of the app instead of the old one.HTMLWebpackPlugin
according to yourdist/index.html
file.npm run build
to produce different hashes).Nothing is actually changed for the general flow of the application, I just fixed the bug.
As a note, every time a new banner is released, we have to update the version number in the
package.json
file, so when users access the gacha simulator, they will be updated instantly with the new banner, instead of being stuck with the old one.References:
Hope it helps, and thank you!
Resolves #12