sw-precache-webpack-plugin: Wrong path to assets when built on windows

Any configuration I’m missing, or is there a bug? It’s working fine when building on my mac, but our build server is running TeamCity/Windows.
My config:
new SWPrecacheWebpackPlugin({
cacheId: 'sw-precache-pwa',
filename: 'sw-precache.js',
})
Isn’t https://github.com/goldhand/sw-precache-webpack-plugin/blob/master/src/index.js#L66 this supposed to strip away this?
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 1
- Comments: 16 (7 by maintainers)
Commits related to this issue
- Add strip prefix multi windows support (#76) Add strip prefix multi windows support (fixes #11) — committed to goldhand/sw-precache-webpack-plugin by goldhand 7 years ago
I encountered the same problem and got around it by adding stripPrefix. Due to windows I had to replace the slashes with forwardslashes in the path to get it working.
My sw-precache-config:
sw-precache-webpack-plugin also automatically sets
stripPrefixto webpack’soutputPathand is influenced by thepublicPathas well