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

Add support for source maps with tree shaking #1564

Closed
devongovett opened this issue Jun 17, 2018 · 5 comments · Fixed by #3695
Closed

Add support for source maps with tree shaking #1564

devongovett opened this issue Jun 17, 2018 · 5 comments · Fixed by #3695

Comments

@devongovett
Copy link
Member

Source maps are currently unsupported with tree shaking. Because of the way we concatenate the ASTs, and the ordering required, the existing source map infrastructure was insufficient to implement this easily for the first release.

There are a couple ways we could make this work:

  1. We could use the source map generated by babel in the concatenate transform and map back to the original source maps generated for each file.
  2. We could attempt to share the original ASTs of each file into the cache so we wouldn't need to parse it again in the packager. These ASTs have the original source map info embedded in them as well, so when we concatenate the ASTs together we can generate a combined source map automatically as well via babel. This option will require some performance testing to see how slow it is to pass the whole AST back over the IPC from workers vs passing generated code.
@misantronic
Copy link

misantronic commented Jun 19, 2018

too bad it's not working right now.
parcel might be an alternative for fuse-box if that worked.

@stevenvachon
Copy link

Almost a year and this still hasn't been fixed?

@devongovett
Copy link
Member Author

This will be addressed in Parcel 2.

@stevenvachon
Copy link

When might we expect that? Positive thinking.

@devongovett
Copy link
Member Author

No promises, but we're getting close to an alpha.

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

Successfully merging a pull request may close this issue.

3 participants