Skip to content

Commit

Permalink
📝 [webpack-source-map-loader] doc: add README
Browse files Browse the repository at this point in the history
  • Loading branch information
lemon-clown committed Mar 28, 2020
1 parent 376232b commit cb6aef7
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions packages/webpack-source-map-loader/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,26 @@
```shell
yarn add @barusu/webpack-source-map-loader
```

## Use in webpack

```javascript
module.exports = {
module: {
rules: [
{
test: /\.js$/,
use: ['@barusu/webpack-source-map-loader'],
enforce: "pre"
}
]
}
};
```

# Why

It seems that [source-map-loader](https://github.com/webpack-contrib/source-map-loader) is no longer maintained, but there still some problems when you are using lerna to structure your project:

* Relative path used by sourcemap in package in monorepo cannot be parsed correctly in other packages
- see [Load all sources without sourceContent and resolve relative sources with context](https://github.com/webpack-contrib/source-map-loader/pull/91)

0 comments on commit cb6aef7

Please sign in to comment.