Replies: 2 comments 1 reply
-
@aaronshaf Thanks for sharing this, I ran into this today and your workaround resolved the issue. Maybe that can be included in the react-refresh plugin? |
Beta Was this translation helpful? Give feedback.
-
Oh, interesting. This is coming from the "@snowpack/plugin-react-refresh" plugin (fast refresh for React). We assume that we own the entire app so we do some set up in the HTML of every application. Fast Refresh requires this setup in the HTML: it won't work if "react-refresh/cjs/react-refresh-runtime.development.js" hasn't been injected into the HTML. The quick solution here for you is to remove that plugin (you may need to stop extending from the "@snowpack/app-scripts-react" base in your configuration to do this.) The solution on our end is to add better logging here. The longer-term solution would be to move the fast-refresh code into a virtual file that the plugin provides, which any application could then import (not just our dev server). I'll spin up an issue to track that. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I did an
npm start
on my snowpack app.Elsewhere I am including this app into a monolith (for a proof of concept).
When I do this I get:
Any ideas? My current workaround is:
Beta Was this translation helpful? Give feedback.
All reactions