You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m using Remix with their Workers integration. This uses the service worker syntax, pending remix-run/remix#764 (which might merge soon!).
When Remix builds in production mode, Wrangler correctly infers it as a service worker. When it builds in development mode (NODE_ENV=development remix build), it’s inferred as an ES Module, which breaks. I know that it should work, because if I edit cli.js locally to always spit out service-worker, it’s fine. So I would like to be able to override the inference when I know what works (and, tbh, to prevent wrangler taking any more time to startup—running an esbuild call can get slow, especially if we’ve already run a build). For now, I’ve had to remove NODE_ENV=development, which overoptimises the build & slows down my dev loop.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I’m using Remix with their Workers integration. This uses the service worker syntax, pending remix-run/remix#764 (which might merge soon!).
When Remix builds in production mode, Wrangler correctly infers it as a service worker. When it builds in development mode (
NODE_ENV=development remix build
), it’s inferred as an ES Module, which breaks. I know that it should work, because if I editcli.js
locally to always spit outservice-worker
, it’s fine. So I would like to be able to override the inference when I know what works (and, tbh, to preventwrangler
taking any more time to startup—running anesbuild
call can get slow, especially if we’ve already run a build). For now, I’ve had to removeNODE_ENV=development
, which overoptimises the build & slows down my dev loop.Beta Was this translation helpful? Give feedback.
All reactions