-
-
Notifications
You must be signed in to change notification settings - Fork 153
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
Default export all members from original module to prevent missing named exports members #522
Conversation
seems this breaks other package,please check the CI testing |
I fixed the previous bug and the tests are normally started and passed on locally. Don't know why failed this one |
hmm, now the testing failed on main branch too, seems it's upstream io timeout, i will look into it |
by the way, can you please add a testing for the PR? |
sure |
thanks, i just updated the default npm CDN to jsdelivr, seem unpkg has io limit i don't know why |
@@ -197,6 +197,8 @@ func (task *BuildTask) build(marker *stringSet) (esm *ESM, err error) { | |||
buf := bytes.NewBuffer(nil) | |||
importPath := task.Pkg.ImportPath() | |||
fmt.Fprintf(buf, `import * as __module from "%s";`, importPath) | |||
// Default reexport all members from original module to prevent missing named exports members | |||
fmt.Fprintf(buf, `export * from "%s";`, importPath) |
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.
maybe only add this when len(esm.Exports) === 0
?
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 can always export from the origin, and the esm.Exports
will overwrite the same name exports
Hei @ije, I has been add the test for this PR. could you please review again |
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 👍👍👍
https://unpkg.com/[email protected]/es/Dom/dynamicCSS.js
https://esm.sh/v106/[email protected]/es2022/es/Dom/dynamicCSS.js
The module is exported members but will be moved to the default export
Add the reexport members to fix this problem