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
notice the public path of fonts and images what I configured in url-loader is s2-8.bdimg.com, but the generated path is https://s1-8.bdimg.com/...
by the way.
the index.html file should not has an CDN path and I wan't to replace the '/template' prefix to '' too. but I can't find a way to change both of them. so depressed.
The text was updated successfully, but these errors were encountered:
hxlniada
changed the title
manifest file generated by workbox-webpack-plugin has wrong public path when using url-loader
manifest file generated by workbox-webpack-plugin has wrong public path when using file-loader
Jul 2, 2018
I took a look through what's exposed in the compilation that's passed to our plugin instance, and I don't see anything that references the custom options.publicPath value that might be set when using file-loader/url-loader.
So, unless anyone more familiar with webpack's compilation / plugin architecture knows of some way of getting that value, there doesn't appear to be a way for our plugin to figure out that your final, effective URL is going to be modified by a custom publicPath prefix that the loader assigns.
The best way forward is probably going to be along the lines of #1227 and open things up to allow folks to transform the precache manifest when using the webpack plugin. That at least provides an escape hatch if we can't automatically infer certain information.
This should be addressed in workbox-webpack-plugin v5. If you need to make any translations to the URL prefixes, you can either use the modifyURLPrefix or manifestTransforms configuration options.
Library Affected:
workbox-webpack-plugin: 3.3.1
Browser & Platform:
webpack: 4.14.0 node: 8.11.2
here is my webpack config:
the generated manifest file is:
notice the public path of fonts and images what I configured in url-loader is s2-8.bdimg.com, but the generated path is https://s1-8.bdimg.com/...
by the way.
the index.html file should not has an CDN path and I wan't to replace the '/template' prefix to '' too. but I can't find a way to change both of them. so depressed.
The text was updated successfully, but these errors were encountered: