-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Remove runtime alias hack #5142
Conversation
// project | ||
// https://github.com/babel/babel/blob/090c364a90fe73d36a30707fc612ce037bdbbb24/packages/babel-plugin-transform-runtime/src/index.js#L35-L42 | ||
absoluteRuntime: path.dirname( | ||
require.resolve('@babel/runtime/package.json') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can pass own path here btw I think. See usage in babel/babel#8435.
That's more or less what we used to do until I changed it in #2175. I was fixing #2172 (comment): it embedded my name in a library build. I think this would regress in the same way: any library using Maybe the solution is to make it an option, and then pass it through from webpack config. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't break libraries
Ideally we should also try to create a relative path somehow. So that even in sourcemaps you'd see something like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally with some e2e regression tests
* Remove runtime alias hack * Pass absolute path to preset * Change comment * Give a relative path to absolute runtime * Clean up config * Tweak again * Make absolute runtime the default * Remove runtime package from error overlay
Inspired by #5136, fixes #5116.