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
Is there a way to disable parcel (especially bundling) on a script tag?
π¦ Context
My plugin parcel-plugin-sw-cache runs Workbox to create a service worker for (pre)caching. For precaching to work, Workbox runs after bundling has finished to create a list of files and hashes. This means however, that the service-worker.js file doesn't exist during the bundling and parcel throws ENOENT: no such file or directory while parsing the navigator.serviceWorker.register call.
Before 1.10, this worked fine, because script tags weren't parsed.
β Question
Is there a way to disable parcel (especially bundling) on a script tag?
π¦ Context
My plugin parcel-plugin-sw-cache runs Workbox to create a service worker for (pre)caching. For precaching to work, Workbox runs after bundling has finished to create a list of files and hashes. This means however, that the
service-worker.js
file doesn't exist during the bundling and parcel throwsENOENT: no such file or directory
while parsing thenavigator.serviceWorker.register
call.Before 1.10, this worked fine, because script tags weren't parsed.
Alternatively, how can I make my plugin work, without hack a like this?
π» Code Sample
https://github.com/mischnic/parcel-plugin-sw-cache/blob/2df57ec/example/src/index.html
π Your Environment
The text was updated successfully, but these errors were encountered: