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
I'm filing this bug as a reminder to address a few takeaways after integrating the 3.0.0-alpha.2 version of new WorkboxPlugin() (without any config) into a vue init webpack-scaffolded project.
There are a few takeaways to follow up on. Some of which may already be tracked independently.
We need to omit the .map files by default.
We need to omit the webpack-specific manifest.[hash].js by default.
We need to use relative, rather than absolute, URLs. (EDIT: This is due to publicPath being configured as /, and we should continue using publicPath, so there's nothing to change.)
We need to detect that the CSS file already includes a hash (it's produced via ExtractTextPlugin() being fed into OptimizeCSSPlugin()).
The text was updated successfully, but these errors were encountered:
Since I'm using the swSrc, I can control the whole precache manifest list in a more flexible way.
I use the following code to omit the .map and hot-update files used by webpack-hot-middleware in development mode.
workbox.precaching.precacheAndRoute(
(self.__precacheManifest || [])
// Exclude .map and hot-update files in development mode.
.filter(function(entry) {
return !/((\.map)|(\.hot-update\.js(on)?))$/.test(entry.url);
})
);
I'm not fussed about checking if the filename has a hash or not, it's a nice to have something we could alter in the future without a change in behavior.
Library Affected:
workbox-webpack-plugin
I'm filing this bug as a reminder to address a few takeaways after integrating the
3.0.0-alpha.2
version ofnew WorkboxPlugin()
(without any config) into avue init webpack
-scaffolded project.The manifest it generates looks like:
There are a few takeaways to follow up on. Some of which may already be tracked independently.
.map
files by default.manifest.[hash].js
by default.We need to use relative, rather than absolute, URLs.(EDIT: This is due topublicPath
being configured as/
, and we should continue usingpublicPath
, so there's nothing to change.)ExtractTextPlugin()
being fed intoOptimizeCSSPlugin()
).The text was updated successfully, but these errors were encountered: