| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| // 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.
We can pass own path here btw I think. See usage in babel/babel#8435.
Sorry, something went wrong.
|
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 babel-preset-react-app would suddenly get hardcoded runtime path. Maybe the solution is to make it an option, and then pass it through from webpack config. |
Sorry, something went wrong.
There was a problem hiding this comment.
We shouldn't break libraries
Sorry, something went wrong.
|
Ideally we should also try to create a relative path somehow. So that even in sourcemaps you'd see something like ../../../node_modules/@babel/runtime instead of your username etc. |
Sorry, something went wrong.
There was a problem hiding this comment.
Ideally with some e2e regression tests
Sorry, something went wrong.
* 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
| Back | FazBrowse Home | New Git URL |
Inspired by #5136, fixes #5116.