-
Notifications
You must be signed in to change notification settings - Fork 800
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
importWorkboxFrom: 'local' bypasses the webpack asset pipeline #1338
Comments
You're correct that we end up copying files using the "real" filesystem rather than adding the files to the webpack compilation. There's a discussion of this in the codebase:
The alternative is not being able to share that The code currently takes Also, given that we're close to the v3.0.0 release, it would be good to understand how much of a "blocker" you consider this issue. |
I should have clarified that this behavior will make it inconsistent in development, specifically for our Webpack setup which relies on a separate Webpack dev server (which will serve the asset from a separate subdomain). Here is a simple illustration of what the structure looks like:
This is not a blocker at all provided that the solution definitely works in production. Prior to beta.1, I already had a solution that copies on behalf of Webpack asset pipeline for development && production consistency. Thank you for looking into this! |
Thanks for the additional information, @raejin. Given that, I'm not going to consider this within scope for the upcoming v3 release, but will leave this issue open to track future refactoring to use the webpack asset pipeline instead of the local filesystem when in |
In 3.1.0 and dev only, precache-manifest is copied in new InjectManifest({
swSrc: `${rootPath}/src/sw.js`,
importWorkboxFrom: "local",
importsDirectory: "static/lib/workbox",
include: [/\.html$/, /\.js$/, /\.css$/, /\.woff2$/]
}) webpack 4.5.0 |
In Workbox v5, any assets created by (We also generate a single, custom runtime bundle of the Workbox code you actually use, rather than copy over the full set of Workbox libraries to the output directory.) |
This should be addressed by the current Workbox v5.0.0 alpha. |
Library Affected:
workbox-webpack-plugin
Moving over @raejin's comment into a standalone issue:
The text was updated successfully, but these errors were encountered: