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

[Discussion] eval-source-map over eval #227

Closed
Rid opened this issue May 21, 2019 · 2 comments
Closed

[Discussion] eval-source-map over eval #227

Rid opened this issue May 21, 2019 · 2 comments

Comments

@Rid
Copy link
Contributor

Rid commented May 21, 2019

Thanks again for maintaining this awesome project @wellyshen.

I'd like to know your opinion on changing the eval source mapping to eval-source-map. Just to refresh you this is from the webpack docs:

eval - Each module is executed with eval() and //@ sourceURL. This is pretty fast. The main disadvantage is that it doesn't display line numbers correctly since it gets mapped to transpiled code instead of the original code (No Source Maps from Loaders).

eval-source-map - Each module is executed with eval() and a SourceMap is added as a DataUrl to the eval(). Initially it is slow, but it provides fast rebuild speed and yields real files. Line numbers are correctly mapped since it gets mapped to the original code. It yields the best quality SourceMaps for development.

It seems like eval can be slightly confusing as the line numbers are not displayed correctly. I've been using eval-source-map on a big project and it seems fast and more suited to easier development.

@wellyshen
Copy link
Owner

wellyshen commented May 22, 2019

@Rid Sure, can you do it with PR #226 ?

@Rid
Copy link
Contributor Author

Rid commented May 23, 2019

@wellyshen no problem, I've put it in #228

@Rid Rid closed this as completed May 23, 2019
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

No branches or pull requests

2 participants