-
-
Notifications
You must be signed in to change notification settings - Fork 601
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
fix: add v12 support #1083
fix: add v12 support #1083
Conversation
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.
Few minor suggestions
Co-Authored-By: Rishabh Chawla <rishabh31121999@gmail.com>
@evenstensberg Thanks for your update. I labeled the Pull Request so reviewers will review it again. @rishabh3112 Please review the new changes. |
Co-Authored-By: Rishabh Chawla <rishabh31121999@gmail.com>
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.
I think the code should behave the other way around. Surround import()
with try/catch after that handle it
); | ||
process.exit(0); | ||
} | ||
return import(resolvedPath); |
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.
This import
statement should be moved
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.
@evenstensberg left some suggestions :)
if (!process.execArgv.includes("--experimental-modules")) { | ||
// TODO: remove in October | ||
console.error( | ||
'\u001b[1m\u001b[31m You need to supply the --experimental-modules flag in order to run webpack with node v12\u001b[39m\u001b[22m' |
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.
Using chalk
here would make it more readable.
} catch (err) { | ||
if (err.stack.indexOf("ERR_REQUIRE_ESM") >= 0) { | ||
if (!process.execArgv.includes("--experimental-modules")) { | ||
// TODO: remove in October |
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.
Back to Future!? 😅
@evenstensberg Please review the following output log for errors:
See complete report here. |
I have to close this as it has been stale long enough, feel free to reopen with updates. |
What kind of change does this PR introduce?
Adds support for v12 if flag is supplied
Did you add tests for your changes?
No
If relevant, did you update the documentation?
No
Summary
nodejs/modules#389
Does this PR introduce a breaking change?
N/A
Other information
N/A