Skip to content

Setting Up Source Maps in Webpack for debugging

Adrian Abel Estévez de León edited this page Nov 4, 2022 · 1 revision

A source map is a software that provides the browser with a means of mapping back code within a compressed file back to its original position in a source file. This way, when an error occurs, you’re pointed to the exact file and line from which it emanates from. To incorporate the source map functionality , we need to follow the next steps:

  1. Go to the file styleguide.config.js
  2. Go to the webpackConfig section
  3. Put the following instructions:

mode: 'development',

devtool: 'cheap-module-source-map',

Clone this wiki locally