-
Notifications
You must be signed in to change notification settings - Fork 44
feat(index): add sourcemap support (options.sourceMap)
#31
Conversation
Update README with -loader suffix to support Webpack 2
docs(*): README && LICENSE
…-BadgeURLs docs(readme): remove unused badges
This is a useful library for doing things like options parsing.
|
|
michael-ciniawsky
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jiaweihli Thx very much for this 👍 Just a docs formatting 'issue' @comment 😛
README.md
Outdated
|
|
||
| > :warning: Doesn't work in NodeJS | ||
| **Options** (Webpack 2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Options
| Name | Type | Default | Description |
|---|---|---|---|
**sourceMap** |
{Boolean} |
false |
Enable/Disable Sourcemaps |
<h2 align="center">Options</h2>
|Name|Type|Default|Description|
|:-----:|:----:|:------:|:-----------|
|**`sourceMap`**|`{Boolean}`|`false`| Enable/Disable Sourcemaps|
|
We have no tests in place here 😊 , if you have an idea to add a quick test setup for the loader aswell please go ahead as otherwise forget about it 🙃 |
Global options like debug are deprecated[0] in webpack 2, and require LoaderOptionsPlugin to enable. This commit adds support for a loader option, sourceMap, to enable configuring this on a loader/require level. Closes: webpack-contrib#30 [0] https://webpack.js.org/plugins/loader-options-plugin/
65ecb5d to
fc02834
Compare
|
Bumped with your suggestion. I don't have an idea for the test setup yet, maybe in a future PR! |
michael-ciniawsky
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jiaweihli Thx
| "author": "Tobias Koppers @sokra", | ||
| "description": "script loader module for webpack", | ||
| "dependencies": { | ||
| "loader-utils": "~1.1.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is webpack 2 only, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure - it's supposed to work for webpack 2, but it doesn't specify the behavior for webpack 1: https://github.com/webpack/loader-utils
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah annoyingly, it's a breaking change with loader-utils && ~.getOptions, I'm in preparation for webpack-defaults for the smaller loaders, when I'm ready with that for script-loader I will merge this PR beforehand and do the chore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, ok.
options.sourceMap)
options.sourceMap)options.sourceMap)
|
@jiaweihli The changes look good. Please rebase against current |
|
Feel free to reopen if the comments are addressed and the CLA is signed. Thx |
PR (Notable Changes)
Global options like debug are deprecated[0] in
webpack >= 2.0.0, and requireLoaderOptionsPluginto be enabled. This commit adds support for a loaderoptions.sourceMap, to enable configuring this on a loader/require level.[0] https://webpack.js.org/plugins/loader-options-plugin/
Issues
Closes #30