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

fix(bundling): fallback to manual file resolution if tsconfig-paths fails #18477

Merged

Conversation

barbados-clemens
Copy link
Contributor

@barbados-clemens barbados-clemens commented Aug 3, 2023

Current Behavior

nxViteTsPaths plugin assumes a file can be resolved via package.json fields,
when there isn't always a package.json to resolve from in a mapped tsconfig path.

causing vite to not be able to understand some cjs deps see #18459

Expected Behavior

able to resolve files from paths that don't contain package.json

also includes options to plugin for debugging, selecting package.json fields, and extenions for file resolving.

Related Issue(s)

Fixes #18459

@vercel
Copy link

vercel bot commented Aug 3, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview Aug 25, 2023 3:31pm

@barbados-clemens barbados-clemens self-assigned this Aug 3, 2023
@barbados-clemens barbados-clemens added the scope: bundlers Issues related to webpack, rollup label Aug 3, 2023
@barbados-clemens
Copy link
Contributor Author

Community slack convo for reference: https://nrwlcommunity.slack.com/archives/CMFKWPU6Q/p1691087332889809

and example repo where this fix is needed
https://github.com/luishcastroc/blog

@fsgreco
Copy link

fsgreco commented Aug 4, 2023

I think maybe my issue is related to this (?) #18492

@barbados-clemens barbados-clemens marked this pull request as ready for review August 8, 2023 15:01
@barbados-clemens barbados-clemens requested a review from a team as a code owner August 8, 2023 15:01
@barbados-clemens barbados-clemens added the PR status: do not merge This will block a PR from being merged until this tag is removed. label Aug 15, 2023
@jaysoo jaysoo changed the title fix(vite): fallback to manaul file resolution if tsconfig-paths fails fix(vite): fallback to manual file resolution if tsconfig-paths fails Aug 25, 2023
@jaysoo jaysoo changed the title fix(vite): fallback to manual file resolution if tsconfig-paths fails fix(bundling): fallback to manual file resolution if tsconfig-paths fails Aug 25, 2023
@barbados-clemens barbados-clemens removed the PR status: do not merge This will block a PR from being merged until this tag is removed. label Aug 25, 2023
@barbados-clemens barbados-clemens enabled auto-merge (squash) August 25, 2023 15:35
@barbados-clemens barbados-clemens merged commit e3b513b into nrwl:master Aug 25, 2023
3 of 4 checks passed
@barbados-clemens barbados-clemens deleted the fix/vite-plugin-resolve-files branch August 25, 2023 20:59
@github-actions
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
scope: bundlers Issues related to webpack, rollup
Projects
None yet
Development

Successfully merging this pull request may close these issues.

buildLibsFromSource: false doesn't work with Vite executors when package.json has no exports field
4 participants