7

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:

webpack source map warnings

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?

Marty Kane
  • 374
  • 2
  • 8

1 Answers1

12

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

Marty Kane
  • 374
  • 2
  • 8
  • 2
    Thank-you, I had been ignoring hundreds of warnings about "failed to load sourcemap" for far too long -- now they are finally gone. – Nick Perkins Nov 05 '20 at 14:07