Skip to content

Conversation

@zcei
Copy link
Contributor

@zcei zcei commented May 18, 2018

With the release of Webpack 4, there's a resolve.mainFields configuration, which defines which package.json fields are checked in which order to determine the entry point of a package import.

Without a target(or target being web / webworker) the order is the following:

mainFields: ["browser", "module", "main"]

Angular 6 for example seems to have not altered such main fields or targets, causing #243.
I used the example project Khaled created here: #243 (comment)

I could remove the manual paths mapping, and the type was correctly inferred again.

@zcei zcei requested a review from Khaledgarbaya May 18, 2018 11:36
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.

3 participants