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
The problem is that it seems like bundling a service worker is a really specific case and somehow when I use env. instead of process.env the browser is claiming invalid variables for those that are used in server side. What I think is happening is service worker when importing env tries to access server side variables which are not available during build time (skipValidation: true on build).
Is there any way to fix this or should I simply not import env in service worker?
The text was updated successfully, but these errors were encountered:
Hello,
I'm using https://serwist.pages.dev/ for service worker where I have a code like this:
The problem is that it seems like bundling a service worker is a really specific case and somehow when I use
env.
instead ofprocess.env
the browser is claiming invalid variables for those that are used in server side. What I think is happening is service worker when importing env tries to access server side variables which are not available during build time (skipValidation: true
on build).Is there any way to fix this or should I simply not import env in service worker?
The text was updated successfully, but these errors were encountered: