Skip to content
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

Support Node-style format aliases #2783

Merged
merged 3 commits into from Apr 2, 2019

Conversation

guybedford
Copy link
Contributor

Now that Node.js --experimental-modules has been updated, it has moved to longer names for formats as a standard in use in flags, package.json and loaders. So instead of "cjs" it is "commonjs" and instead of "esm" it is "module".

I know it's a pain, but I think it would be beneficial if we can support these aliases now, and possibly even consider them as the defaults in the long terms.

Apologies for whatever role I've played in churn here too :)

Copy link
Member

@lukastaegert lukastaegert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot! If we want to consider switching to the new format names at some point, it might make sense to also add them to types.d.ts?

src/utils/mergeOptions.ts Show resolved Hide resolved
@guybedford
Copy link
Contributor Author

I've also included the typing change - wasn't sure if that was wanted or not, but certainly can make sense.

@lukastaegert lukastaegert merged commit 8825cdb into rollup:master Apr 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants