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 "mainFields" option #21

Merged
merged 3 commits into from
Jun 12, 2018

Conversation

christoffer
Copy link
Contributor

This adds an option "mainFields" which allows path mapped modules to resolve to the same files as the Webpack when mapped packages include field names ("main", "browser", etc).

Sadly we seem to not be able to use the Webpack config resolve.mainFields, so this PR only adds it as a configuration option to the plugin directly (same situation as with option extensions).

Depends on PR in tsconfig-paths: dividab/tsconfig-paths#45

Fixes #20

@jonaskello
Copy link
Member

Thanks!

@jonaskello jonaskello merged commit f7099a7 into dividab:master Jun 12, 2018
@jonaskello
Copy link
Member

Released in 3.2.0.

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.

Only "main" in package.json used if path mapping matches node module
2 participants