Skip to content
This repository was archived by the owner on Nov 5, 2019. It is now read-only.

Conversation

@jklmli
Copy link

@jklmli jklmli commented Apr 13, 2017

PR (Notable Changes)

chore: update `loader-utils` v0.0.0...1.1.0 (:label: Major)
feat: support sourcemap support (`options.sourceMap`)

Global options like debug are deprecated[0] in webpack >= 2.0.0, and require
LoaderOptionsPlugin to be enabled. This commit adds support for a loader
options.sourceMap, to enable configuring this on a loader/require level.

[0] https://webpack.js.org/plugins/loader-options-plugin/

Issues

Closes #30

Edited by @michael-ciniawsky (Formatting && Grammar)

@jsf-clabot
Copy link

jsf-clabot commented Apr 13, 2017

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
6 out of 7 committers have signed the CLA.

✅ sokra
✅ SpaceK33z
✅ michael-ciniawsky
✅ d3viant0ne
✅ wuxiandiejia
✅ jiaweihli
❌ kevinzwhuang

Copy link
Member

@michael-ciniawsky michael-ciniawsky left a 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)
Copy link
Member

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|

@michael-ciniawsky
Copy link
Member

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/
@jklmli jklmli force-pushed the enable-source-maps-option branch from 65ecb5d to fc02834 Compare April 17, 2017 11:26
@jklmli
Copy link
Author

jklmli commented Apr 17, 2017

Bumped with your suggestion. I don't have an idea for the test setup yet, maybe in a future PR!

Copy link
Member

@michael-ciniawsky michael-ciniawsky left a 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",
Copy link

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?

Copy link
Author

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

Copy link
Member

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

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, ok.

@michael-ciniawsky michael-ciniawsky changed the title Enable source maps option feat: add sourcemap support (options.sourceMap) Aug 24, 2017
@michael-ciniawsky michael-ciniawsky added this to the 1.0.0 milestone Aug 24, 2017
@michael-ciniawsky michael-ciniawsky changed the title feat: add sourcemap support (options.sourceMap) feat(index): add sourcemap support (options.sourceMap) Sep 12, 2018
@michael-ciniawsky
Copy link
Member

@jiaweihli The changes look good. Please rebase against current master and fix the commit author for the CLA (or open an new PR). Otherwise I'm going to close this PR within the next ~48-72 hours due to the missing CLA signment and inactivity

@michael-ciniawsky
Copy link
Member

#31 (comment)

Feel free to reopen if the comments are addressed and the CLA is signed. Thx

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants