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 nested properties in resolve.mainFields #7204

Closed
pravdomil opened this issue May 4, 2018 · 2 comments
Closed

Support nested properties in resolve.mainFields #7204

pravdomil opened this issue May 4, 2018 · 2 comments

Comments

@pravdomil
Copy link

pravdomil commented May 4, 2018

Feature request

http://2ality.com/2017/04/transpiling-dependencies-babel.html#extended-versions-of-pkgesnext

webpack.config.js:

resolve: { mainFields: ["esnext.main"] }

package.json:

{
  "esnext": {
    "main": "main-esnext.js",
    "browser": "browser-specific-main-esnext.js"
  }
}

What is the expected behavior?

support nested properties in resolve.mainFields

What is motivation or use case for adding/changing the behavior?

deliver un-transpiled source code for different platforms

How should this be implemented in your opinion?

https://github.com/rauschma/esnext-demo#rationale-and-future

Are you willing to work on this yourself?

yes

@ooflorent
Copy link
Member

webpack already supports nested main fields:

mainFields: [["esnext", "main"], "esnext", "main"],

Support for paths will not be added because it would break builds were the dot is intentional ("esnext.main" is a valid field name).

@pravdomil
Copy link
Author

Great!

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

No branches or pull requests

2 participants