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

Generate source map files with long extentions (e.g. .js.map) #2472

Merged
merged 1 commit into from Dec 27, 2018

Conversation

kirillrogovoy
Copy link
Contributor

↪️ Pull Request

Closes #2460.

What I do here is preserve the original file extension before appending .map to the source map files.

Instead of index.map it would generate index.js.map. According to the spec it's the recommended convention. It also solves a real issue for debugging Javascript in VSCode.

While it solves the issue, I don't like the tech debt I introduce. Specifically, I don't like the conditionals about specific types of bundles in the otherwise abstract code.

@DeMoorJasper please, take a look and let me know if you can think of a more pleasing solution architecture-wise. This is my first peek at the internals of Parcel, so I don't have the whole context yet.

✔️ 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

@DeMoorJasper DeMoorJasper merged commit 0c0563d into parcel-bundler:master Dec 27, 2018
@DeMoorJasper
Copy link
Member

I think there was no nice way of solving this. It works and it's not that bad, so I guess it's good enough

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.

Parcel does not keep file extension when creating source maps
2 participants