-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[Bug] Weird behavior of Remix in dev mode #1884
Comments
See #1818 and #1832. You can work around this by attaching your cache to the const cache = (() => {
const globalCache = global as { cache?: string[] };
if (!globalCache.cache) {
globalCache.cache = ["1"];
}
return globalCache.cache;
})(); (If you do this in different parts of the app, you might want to use a more specific name than just This might be a bit verbose, but it's probably the best you can do for now. Just remember that when using the |
Thank @cmd-johnson, that's an awesome explanation and work around |
This is already described in https://remix.run/docs/en/v1/other-api/serve, but could benefit from an additional example and workaround as provided by @cmd-johnson |
It may be similar to this issue. A promising solution is proposed here. In the meantime, you can use UPDATE: for |
Fixed by #5133 which will make the new dev server available in the next minor release under the |
What version of Remix are you using?
1.1.3
Steps to Reproduce
Environment
Windows 11
WSL2
Reproducible code https://github.com/lagz0ne/remix-bug
The code doesn't really work in Dev mode but works well in Production mode
The action part seems to be called but didn't persist the change to the content. As such, the loader takes the content from the original stage, not sure this has anything to do with the model of rebuilding (please have a look at the index route in the repository).
Expected Behavior
Works in Dev mode
Actual Behavior
Doesn't function in dev mode
The text was updated successfully, but these errors were encountered: