Skip to content
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

fix: respect inputSourceMap loader option #896

Merged
merged 1 commit into from
Apr 14, 2022

Conversation

alan-agius4
Copy link
Contributor

Please Read the CONTRIBUTING Guidelines
In particular the portion on Commit Message Formatting

Please check if the PR fulfills these requirements

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior? (You can also link to an open issue here)
Currently, when the loader is invoked without a map object the inputSourceMap fallbacks to undefined.

This caused the sourcemap to be loaded by Babel since this defaults to true https://babeljs.io/docs/en/options#inputsourcemap

Thus, currently there is no way to disable inputSourceMap when using this loader.

What is the new behavior?
Respect inputSourceMap option provided by the loader options.

Does this PR introduce a breaking change?

  • Yes
  • No

If this PR contains a breaking change, please describe the following...

  • Impact:
  • Migration path for existing applications:
  • Github Issue(s) this is regarding:

Other information:

@alan-agius4
Copy link
Contributor Author

The CI failure doesn't to be caused by my changes.

Copy link
Contributor

@JLHwung JLHwung left a comment

Choose a reason for hiding this comment

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

Thanks!

alan-agius4 added a commit to angular/angular-cli that referenced this pull request Mar 15, 2021
alan-agius4 added a commit to angular/angular-cli that referenced this pull request Mar 15, 2021
Currently, when the loader is invoked without a `map` object the `inputSourceMap` fallbacks to `undefined`.

This caused the sourcemap to be loaded by Babel since this defaults to `true` https://babeljs.io/docs/en/options#inputsourcemap

Thus, currently there is no way to disable `inputSourceMap` when using this loader.
@alan-agius4
Copy link
Contributor Author

@JLHwung, can you please merge this if CI is green?

@JLHwung JLHwung merged commit c622868 into babel:main Apr 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants