From 6c714701f39d977ba656356e3001c6eede16f187 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20Ben=C3=ADcio?= Date: Wed, 30 May 2018 09:07:55 -0300 Subject: [PATCH] Update README.md - Adding Source Maps Section --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index 1e84dc6..0df9fab 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,24 @@ module.exports = { }; ``` +## Source-maps: + +Notice that, in order to handle Source Maps properly, you also need to setup properly your CSS processor. +The default cssProcessor is `cssnano` and the default configuration option is `{}`. As no `map` property is specified, it will probably not generate any intended Source Map. +So, if you are using `cssnano` (default one) and want to support Source Maps, consider setting the `map` option with something like this: + +```javascript +new OptimizeCSSAssetsPlugin({ + cssProcessorOptions: { + map: { + inline: false + } + } +}) +``` + +Take a look at your cssProcessor docs for more ways to handle source-maps. + ## License MIT (http://www.opensource.org/licenses/mit-license.php)