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
Make sure that Rollup's dynamicRequireTargets
are included
#12839
Make sure that Rollup's dynamicRequireTargets
are included
#12839
Conversation
@@ -312,7 +314,7 @@ function buildRollup(packages, targetBrowsers) { | |||
"./packages/babel-helper-create-regexp-features-plugin", | |||
"regexpu-core", | |||
"regenerate-unicode-properties" | |||
) + "/../**", | |||
) + "/**/*.js", |
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.
Without the explicit .js
extension it was trying to parse the LICENSE file as JS.
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/41632/ |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 67d3061:
|
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.
Black magic.
0e918d0
to
cab0315
Compare
cab0315
to
00fc143
Compare
00fc143
to
1e4e597
Compare
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.
🪄
Co-authored-by: Brian Ng <bng412@gmail.com>
This is a follow-up to #12819: that PR was going in the good direction, but it didn't actually fix the issue: Rollup wasn't injecting the
dynamicRequireTargets
anywhere, and we didn't notice it because apparently it fallbacks to Node'srequire()
function (which works on CI). You can see it in #12819's repl.I noticed it when rebasing #12015: that PR needed another
dynamicRequireTarget
, but it caught the error because it was for a relative path which made Node's resolution algorithm fail.I particularly dislike this solution, but it's the only thing I could came up with to make it work.
I'd like to include this in the next version, since it's a follow-up to #12819 which has already been merged.
Repl for this PR: https://babeljs.io/repl/build/41352/#?browsers=%3E0.5%25%2C%20not%20ie%2010&build=&builtIns=false&spec=false&loose=false&code_lz=G4QwTgBAHhC8EHoA6AHA3gGQL4IK4G4g&debug=false&forceAllTransforms=false&shippedProposals=false&circleciRepo=&evaluate=false&fileSize=false&timeTravel=false&sourceType=module&lineWrap=false&presets=env&prettier=false&targets=&version=7.12.18%2Bpr.12839&externalPlugins=