-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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(lib)!: remove format prefixes for cjs and esm #8107
Conversation
@@ -592,6 +592,10 @@ export function resolveLibFilename( | |||
extension = format === 'es' ? 'mjs' : 'js' | |||
} | |||
|
|||
if (format === 'cjs' || format === 'es') { |
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.
Not for this PR, but should we allow es
(deprecate this) / esm
(new value)
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.
Do you have some links to support esm
over es
? Rollup is using es
for their format config, I think alignment with them is good here.
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.
Oh interesting, I thought this was coming from cjs/esm wordings that also e.g. TypeScript is using
Description
Follow up to #6827. Remove the format extensions for
cjs
andesm
. Example:my-lib.es.js
->my-lib.js
.This is a breaking change.
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).