Skip to content

Update README.md - Adding Source Maps Section #54

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)