Webpack InjectManifest plugin produces incorrect source maps in Webpack...
Brought to you by:
tomkozak
Originally created by: ezzatron
Originally owned by: jeffposnick
Library Affected:
workbox-webpack-plugin v5 beta
Browser & Platform:
all browsers
Issue or Feature Request Description:
When using the workbox-webpack-plugin InjectManifest plugin with Webpack in production mode, the service worker source maps are corrupted/incorrect.
yarn installwebpackdist/sw.js and dist/sw.js.map into a [source map visualization tool] and see the [buggy output]The issue seems to be that the source map is generated before the precache manifest is added, because manually removing the precache manifest from the compiled service worker makes the source map line up with the intended positions in the code.
Ticket changed by: jeffposnick