Move module resolution before config
↪️ Pull Request
Parcel shouldn't ignore the existing tsconfig's module resolution. This PR moves the moduleResolution property up before the expansion of config. That way if the user provides a moduleResolution in their .tsconfig, Parcel doesn't override it.
💻 Examples
The issue occurs when using NodeNext as a module resolution. Since Parcel overrides the module resolution, packages that use package.json:exports are no longer resolvable by TypeScript.
🚨 Test instructions
Import a package that uses exports in the package.json file, then make Parcel export types. Warnings will be thrown from TypeScript about missing modules. If your .tsconfig has NodeNext as the moduleResolution, then Parcel shouldn't override it. With it not overridden, the warnings do not occur.
Notes
I'm using my package @kkirbatski/parcel-resolver-require-resolve to make Parcel compatible with exports in package.json.
✔️ PR Todo
- [ ] Added/updated unit tests for this change
- [x] Filled out test instructions (In case there aren't any unit tests)
- [ ] Included links to related issues/PRs