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 sourceMappingURL for bundles with multiple entry points #2645

Conversation

lustoykov
Copy link
Contributor

↪️ Pull Request

sourceMappingURL is not correct for bundles with multiple entry points

💻 Examples

Taken from #2607

parcel build src/a/index.js src/b/index.js

The two output files should contains these sourcemap comments:

a/index.js: `//# sourceMappingURL=/a/index.js.map`
b/index.js: `//# sourceMappingURL=/b/index.js.map`

but in reality /a/ and /b/ are not there.

🚨 Test instructions

See #2607 for detailed instructions. For tldr, see Examples 👆

✔️ PR Todo

  • Added/updated unit tests for this change
  • Filled out test instructions (In case there aren't any unit tests)
  • Included links to related issues/PRs

@@ -239,7 +239,7 @@ class JSPackager extends Packager {
if (mapBundle) {
let mapUrl = urlJoin(
this.options.publicURL,
path.basename(mapBundle.name)
path.relative(this.options.outDir, mapBundle.name)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

only change is here, rest are tests

@lustoykov lustoykov force-pushed the fix-sourcemaps-for-multi-entrypoints branch from c0eff27 to 30627a1 Compare February 14, 2019 13:54
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.

None yet

2 participants