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
boa: support esm #191
boa: support esm #191
Conversation
packages/boa/esm/loader.mjs
Outdated
@@ -0,0 +1,39 @@ | |||
import Boa from '../lib/index.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.
import Boa from '../lib/index.js'; | |
import boa from '../'; |
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.
Doesn't seem to automatically look for 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.
Weird, we have defined the main
as "lib/index.js" at https://github.com/alibaba/pipcook/blob/master/packages/boa/package.json#L5.
Thank you @rickyes I have commented some, and unit test is also required :) |
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.
LGTM except lint nit:)
Of course, when the deconstruction import is supported, unit tests will be added together. |
packages/boa/tests/fixtures/es-module-loaders/test-esm-loader-export-default.mjs
Outdated
Show resolved
Hide resolved
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 have some comments for your changes, and we also need more tests, which needs cover builtins, base package and numpy.
Okay, I'll supplement the base library test. |
I've made some changes, please review them. |
b9697f6
to
2cacb74
Compare
@rickyes May I ask you to revert the code coverage? It seems that LGTM except that :) |
It seems the above error occurred. |
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.
LGTM
fixes: #173
Support
export default
andnamed export
import./cc @yorkie