Skip to content

Allow SourceMapDevToolPlugin.append option to be a function#11497

Closed
okmttdhr wants to merge 3 commits intowebpack:mainfrom
okmttdhr:improve/source-map-file-customizable
Closed

Allow SourceMapDevToolPlugin.append option to be a function#11497
okmttdhr wants to merge 3 commits intowebpack:mainfrom
okmttdhr:improve/source-map-file-customizable

Conversation

@okmttdhr
Copy link

@okmttdhr okmttdhr commented Sep 18, 2020

#783

Allow SourceMapDevToolPlugin's append option to be a function so that source-map could be better customized. #783 (comment)

(Though it seems that SourceMapDevToolPlugin might be able to solve the URL issue with the publicPath and append options).

What kind of change does this PR introduce?

feature

Did you add tests for your changes?

Yes

Does this PR introduce a breaking change?

No

What needs to be documented once your changes are merged?

Allow SourceMapDevToolPlugin's append option to be a function
https://webpack.js.org/plugins/source-map-dev-tool-plugin/#options

I didn't change the behavior, but maybe EvalSourceMapDevToolPlugin also. Because setting append option to false doesn't disable the appending but just set the default value ("//# sourceURL=[module]\n//# sourceMappingURL=[url]").
https://webpack.js.org/plugins/eval-source-map-dev-tool-plugin/

@webpack-bot
Copy link
Contributor

For maintainers only:

  • This needs to be documented (issue in webpack/webpack.js.org will be filed when merged)
  • This needs to be backported to webpack 4 (issue will be created when merged)

So that source-map could be better customized.
See webpack#783
@okmttdhr okmttdhr force-pushed the improve/source-map-file-customizable branch 2 times, most recently from 7eab964 to 22aa515 Compare September 19, 2020 13:44
@okmttdhr okmttdhr force-pushed the improve/source-map-file-customizable branch from 89ede48 to 6867392 Compare September 19, 2020 14:28
@webpack-bot
Copy link
Contributor

Thank you for your pull request! The most important CI builds succeeded, we’ll review the pull request soon.

@webpack-bot
Copy link
Contributor

It looks like this Pull Request doesn't include enough test cases (based on Code Coverage analysis of the PR diff).

A PR need to be covered by tests if you add a new feature (we want to make sure that your feature is working) or if you fix a bug (we want to make sure that we don't run into a regression in future).

@okmttdhr Please check if this is appliable to your PR and if you can add more test cases.

Read the test readme for details how to write test cases.

@alexander-akait
Copy link
Member

@snitin315 Just a small job - resend it 😄

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants