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

jsnext:main #132

Merged
merged 11 commits into from
Dec 1, 2015
Merged

jsnext:main #132

merged 11 commits into from
Dec 1, 2015

Conversation

benmosher
Copy link
Member

Closes #103.

  • node resolver defers to jsnext:main in package.json.
  • webpack resolver will as well, in addition to respecting Webpack's resolve.packageMains field properly.
  • breaking: import/ignore patterns are checked only once export parsing has yielded no results.
    This means node_modules with jsnext:main (i.e. Redux) will have names collected in spite of node_modules being ignored by default.

benmosher added a commit that referenced this pull request Dec 1, 2015
@benmosher benmosher merged commit a44341b into master Dec 1, 2015
@benmosher benmosher deleted the jsnext branch December 2, 2015 11:05
@taion
Copy link
Contributor

taion commented Aug 7, 2016

Wait, why? webpack 1 can't handle ES modules, so there's no point looking at jsnext:main.

@benmosher
Copy link
Member Author

It can't, yes, but the original ES6 source is necessary for the plugin to lint correctly

@taion
Copy link
Contributor

taion commented Aug 8, 2016

Ah, for named imports?

You should consider adding module there as well, then. It's the slightly more standardized (but still will-never-be-in-Node) successor to jsnext:main.

Most libraries are starting to support it now, and it's what webpack 2 will check by default.

@benmosher
Copy link
Member Author

Yep, meaning to do that soon 😅

@taion
Copy link
Contributor

taion commented Aug 8, 2016

I'll add it to #475.

michaelfaith pushed a commit to michaelfaith/eslint-plugin-import that referenced this pull request Sep 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Use Rollup's 'jsnext:main' to collect names
2 participants