8000 feat(nuxt): resolve unresolved paths within `node_modules` by danielroe Β· Pull Request #22478 Β· nuxt/nuxt Β· GitHub
[go: up one dir, main page]

Skip to content

feat(nuxt): resolve unresolved paths within node_modules #22478

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

Merged
merged 9 commits into from
Aug 7, 2023

Conversation

danielroe
Copy link
Member

πŸ”— Linked issue

#14146

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

This adds a resolve step to resolve paths deeply within node_modules which cannot otherwise be resolved.

In my testing, this enables use with vite and without shamefully-hoist, as long as vue and vue-router are explicitly installed (as they are in vite's optimizeDeps.include).

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Co-authored-by: pooya parsa <pyapar@gmail.com>
@danielroe danielroe added this to the 3.7 milestone Aug 7, 2023
@danielroe danielroe requested a review from pi0 August 7, 2023 17:59
@danielroe
Copy link
Member Author

/ecosystem-ci run

@nuxt-ecosystem-ci
Copy link
nuxt-ecosystem-ci bot commented Aug 7, 2023

πŸ“ Ran ecosystem CI: Open

suite result
starter βœ… success
content ❌ failure
image βœ… success
pinia βœ… success
examples βœ… success
bridge βœ… success
nuxt-vitest ❌ failure
vite-pwa βœ… success
docus βœ… success
og-image βœ… success
elk βœ… success
devtools βœ… success
module-builder βœ… success
sanity-module βœ… success
i18n-module βœ… success

@danielroe danielroe merged commit b5c9a81 into main Aug 7, 2023
@danielroe danielroe deleted the feat/resolve-deep-paths branch August 7, 2023 22:05
@github-actions github-actions bot mentioned this pull request Aug 7, 2023
// TODO: respect nitro runtime conditions
conditions: options.ssr ? ['node', 'import', 'require'] : ['import', 'require']
}).catch(() => {
console.log('[nuxt] Could not resolve id', id, importer)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some plugins like Vue Macros will try to resolve multiple times, until successfully. In nuxt, it will warn and could disturb on userland.

Can we change it from log to debug level?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0