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

Add support for ESM "module" entrypoint #434

Merged
merged 1 commit into from Aug 28, 2019

Conversation

FredKSchott
Copy link
Contributor

This lets tools like pika.dev detect that your package is written as an ES Module and not Common.js. See https://github.com/rollup/rollup/wiki/pkg.module for more info

Copy link
Collaborator

@aomarks aomarks left a comment

Choose a reason for hiding this comment

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

Hi @FredKSchott! LGTM, thanks for the PR!

@aomarks
Copy link
Collaborator

aomarks commented Aug 27, 2019

Actually a question. It looks like rollup-plugin-node-resolve already falls back to main if module isn't found. Since we never intend to distribute a non-modules version, isn't this kind of fallback good enough? Does pika require the module field as its signal that a package should be indexed?

@justinfagnani
Copy link

Also, what about "type": "module". Would that suffice?

@abraham
Copy link
Contributor

abraham commented Aug 27, 2019

A module entry is needed for unpkg. https://unpkg.com/@material/mwc-fab@0.7.0?module

Copy link
Collaborator

@dfreedm dfreedm left a comment

Choose a reason for hiding this comment

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

LGTM2

@FredKSchott
Copy link
Contributor Author

👋 hey y’all! Great to see so many familiar faces. @kenchris tagged me in here from twitter.

I’d have to find it, but the official Node guidance is to not publish anything with “type”:”module” yet until it’s officially out from behind the flag. But their main concern is node breakage, so 🤷‍♂️.

Copy link
Member

@e111077 e111077 left a comment

Choose a reason for hiding this comment

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

approval train 🚂

@aomarks aomarks merged commit e7ef089 into material-components:master Aug 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants