-
-
Notifications
You must be signed in to change notification settings - Fork 653
Disable caching service worker via .env #1942
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable caching service worker via .env #1942
Conversation
@DreadKnight What changes are needed to copy |
@nandastone I've configured both Heroku and GitHub pages to use our |
So we would have the |
Good question. The codebase already has a You'll need to:
|
It's there for now because it wasn't ignored so far. But it's really fine to have it for now, makes getting into development easier. |
Updated variables. Usually what I do in these type of situations is simply use As a side note related to this: Earlier I did found some env related npm package plus nice guide, which allowed to define a lot of configs within a file and pick between those easily (guess multiple servers at some point if needed). |
@DreadKnight This MR already has a Is that what you meant? |
@nandastone What I mean is for that to be more than just a placeholder file, to actually be read by the project if |
I've did things like that even for this project and it's way more efficient. We'll just avoid copying |
@@ -1,8 +1,13 @@ | |||
import { Client } from '@heroiclabs/nakama-js/dist/nakama-js.esm'; | |||
import { Client } from '@heroiclabs/nakama-js'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, interesting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It resolves to the same file, just feels safer this way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it's nice. Back when we started using Nakama, the JS version was super broken and unmaintained overall, so we bumped into so many issues with it. Their NPM package was exploding in popularity, though the devs were kinda "meh, patches welcome".
Usually was using the "JS if else conditional operator shortcut" when trying to fetch all them |
@DreadKnight I've installed |
Woot! Good find, this is nice and useful 👍🏻 |
inside GH template
@nandastone Seems there's a conflict, kinda confusing to fix it myself from GH's UI. Please tweak and I'll merge right away. |
* master: (39 commits) Comment tweak Fix disable materialization sickness power Make it easier to read tooltips Fix close icon capitalization Improve vertical position of reset button Improve preview creature summoning with "disable sickness" Meta Powers persist by default Prevent Tentacle bush from stacking on attacker Remove damage and apply effect directly Tidying some things Suppress double log Change tentacle bush to "apply on end of phase" effect. Comment tweak Tweak Nutcase to match impaler Tweak Fix impaler movement drop Fix nutcase swap death Fix linting issue Tweaks ... # Conflicts: # package-lock.json
Fixed merge conflict, it was just |
I'm aware, but at times finding the GH's way of dealing with conflicts ultra confusing, it's too asci and rather cryptic unless I put a lot of time figuring stuff out. Glad that you managed way easier :) |
…worker-dev Disable caching service worker via .env
Developing on the
webpack-dev-server
required a manual hard reload after every automatic hot-load. If this wasn't done, the service worker would serve the HTML + assets that were built when the dev server first started, without any recent changes.This MR:
.env
settingDISABLE_SERVICE_WORKER=false
to disable the service worker. We could also disable the service worker in development mode, but it's useful to be able to test the service worker..env
into.gitignore
and creates.env.example
. This allows a developer to set.env
without the worry of accidentally committing their local environment settings.