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
{{ message }}
This repository has been archived by the owner on Nov 20, 2019. It is now read-only.
Hello @titanve! entry: "./pass/to/your/sw/on/project/befor/compilation" - it is where webpack will try to find your file. in Your case it should be entry: path.join(__dirname, 'sw_cached_pages.js') (don't forget to const path = require('path'))
filename: 'name-of-the-file-after-webpack-compilation' - after webpack compilation it create file wit name you presented here.
You can check my answer on stack overflow for mor explanation on how to register sw.js correctly. :)
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hello everyone!
Can you please help me telling me what is the difference between
entry: " ..."
andfilename: " ..."
?
I've been trying since yesterday to config the plugin but it's been impossible.
My
sw_cached_pages.js
is in the same folder of theindex.js
and webpack puts the bundles inside/dist
folderWhat is the right config in order to load my service worker file and get the
serviceWorkerOption
variable?My folder structure is:
+- /spa
--> |- /dist
--> --> |- 1.bundle.js
--> --> |- bundle.js
--> --> |- sw.js <--- 'Generated by the plugin with the bundles list'
--> |- index.js
--> |- webpack.config.js
--> |- sw_cached_pages.js
My plugin config:
Thank you in advance!
The text was updated successfully, but these errors were encountered: