Closed kierenj closed 7 years ago
Do you have source maps configured in webpack? It should be something along the lines of
devtool: 'sourcemap'
Ah - I do for production deployment, but not for development. I don't have a version running with the production deployment at the moment to check. Is it required to do this?
Yeah, you should use source maps to stop this error and for your own sanity. Right now it's looking for the source map that it would use if you used a script tag, which isn't being served. When webpack builds with a source map it's smart enough to use the bundled one.
I may be using the package incorrectly, so please advise if so.
However, the packaged scrollMonitor.js has a reference to scrollMonitor.js.map. Webpack pulls in the main JS file but not the map, and so on every page I get error saying that it couldn't find or parse the map file.
Unless I should somehow be configuring my Webpack to look in minified JS files and pull our relative map paths and bundle them to (or it maybe it should be default?).