I'm using snabbdom.js and webpack to build a JS front-end app. I have a very simple snabbdom view and webpack config that bundles it up. When I load the bundle in chrome I get all this stuff in the console:
I can set the webpack mode
to production
which does get rid of these warnings but it also turns off all source maps, so that's not really helpful. I found this other related question that describes how to use a plugin to load them. But I don't want to mess around with configuring a plugin for source maps I don't actually want. Is there a way to tell webpack to just ignore these?
I read up a bit more on the details of each option in the webpack devtools
options and found that adding
devtool: 'eval-cheap-source-map',
to my webpack config did the trick.
From the docs:
it doesn't have column mappings, it only maps line numbers. It ignores SourceMaps from Loaders and only display transpiled code similar to the eval devtool
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With