-
Notifications
You must be signed in to change notification settings - Fork 60
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
type: 'module' or format: 'esm' should generate esm modules #1096
Labels
need/triage
Needs initial labeling and prioritization
Comments
Typically node modules don't import the minified files, instead the ESM source or ESM transpiled from TS in Browser modules are typically bundled too so also import the ESM source/transpiled TS. ESM should work as a minification option though. Would you like to submit a PR that ensures there's no UMD wrapper when |
This was referenced Nov 2, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Right now the resulting
dist/index.min.js
does not provide named exports because the format is not set to esm. This happens because of paddedumd
banner and footer. The output should be esm which can then be imported for both the browser and node.This can be achieved right now by setting
package.json
like so:This should be selected by default if:
package.json
type is set tomodule
build.config.format
isesm
The text was updated successfully, but these errors were encountered: