-
Notifications
You must be signed in to change notification settings - Fork 26
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
Add support for esm #24
Conversation
|
||
var esmPath | ||
try { | ||
esmPath = resolve.sync('esm/esm', { paths: module.parent.paths }) |
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.
Does module.parent.paths
do what we want it to do in cases where quibble is a second/third/fourth degree transitive dependency for a user? Would we want to resolve relative to process.cwd()
or some other top-level?
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.
Totally! I will set up an example project for transitive dependencies and see how this technique fares. I imagine we will need to walk the module.parent
tree or use a different technique altogether.
Apologies for taking so long to review this. Three areas of questions for me
|
@searls Thanks for the review! You raise some excellent concerns I hadn't considered with the transitive
Actually it does, but it is super not obvious. In |
What does this do?
Add support for libraries and apps using esm, an ES6 module loader for node.
Status
Works On My Machine™ when testing with
npm link
in this repo: https://github.com/pingortle/quibble-plus-esmTo do
../index
with a simple test suite (similar to my repro repo above)See #13