-
Notifications
You must be signed in to change notification settings - Fork 822
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change swDest in webpack. #1742
Comments
I don't think anything can be done from Workbox's side. Easiest fix would be to run a |
that's an obvious thing to do to "copy it", but that's a wrong thing to do, the best thing would be if |
Specifying an absolute path to your desired filesystem directory might work here—it should be supported (#1370). I can't guarantee that all of the relative paths that are used inside of your service worker to load dependencies like the Workbox library and precache manifest will work as-is—they might also need to be tweaked via the |
Closing this issue as I'm not sure there's anything more that's actionable here. If the advice provided doesn't address what you're seeing, please let us know and we can reopen it. |
Guys I have a question for you, it's great that it is attaching webpack config publicPath. How to operate if I am using something like Wordpress + Webpack + Browser-sync + Workbox? In my case the publicPath: '/wp-content/themes/theme/public/js/' so the default destination of the worker becomes
http://localhost:3000/wp-content/themes/theme/public/js/sw.js so it does not catch any request from root / and pretty much makes it useless. Is there a way around it as if I change swDest: from 'sw.js' to '../sw.js', sw.js disappears and can't be loaded. As WordPress does not store assets inside theme it stores them in /wp-content/uploads/. I could make a symbolic link for service worker inside root directory and link it to theme
service worker.js
file but it would not work if I use dev server as it stores all assets in memory?The text was updated successfully, but these errors were encountered: