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
to my app.
To build my app; parcel build --no-source-maps --public-url='/static/' --dist-dir='static'
Now, as you may have already imagined, it will put all file at static/* dir and that includes service-worker.js, which is not a problem.
The problem is that the final path for service-worker is /static/service-worker.js which is obviously wrong, since service worker must be on root path(/service-worker.js).
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
Uh oh!
There was an error while loading. Please reload this page.
-
I've a small app that uses service worker, it is just like in the documentation;
yarn add @parcel/service-worker
and addto my app.
To build my app;
parcel build --no-source-maps --public-url='/static/' --dist-dir='static'
Now, as you may have already imagined, it will put all file at
static/*
dir and that includesservice-worker.js
, which is not a problem.The problem is that the final path for
service-worker
is/static/service-worker.js
which is obviously wrong, since service worker must be on root path(/service-worker.js
).suggestions?
Beta Was this translation helpful? Give feedback.
All reactions