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: resolve deps modules #1653

Merged
merged 1 commit into from Nov 18, 2022
Merged

fix: resolve deps modules #1653

merged 1 commit into from Nov 18, 2022

Conversation

kazupon
Copy link
Collaborator

@kazupon kazupon commented Nov 18, 2022

resolve #1518
resolve #1613

@netlify
Copy link

netlify bot commented Nov 18, 2022

Deploy Preview for nuxt-i18n-v8 ready!

Name Link
🔨 Latest commit 5bf5131
🔍 Latest deploy log https://app.netlify.com/sites/nuxt-i18n-v8/deploys/637745d16d5cee000983fc83
😎 Deploy Preview https://deploy-preview-1653--nuxt-i18n-v8.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@kazupon kazupon merged commit b832f07 into next Nov 18, 2022
@kazupon kazupon deleted the fix/resolve-alias branch November 18, 2022 08:51
@rchl
Copy link
Collaborator

rchl commented Nov 18, 2022

This seems absolutely horrible in my opinion and I don't think anyone should ever need to do such things.

Sorry that I don't have better suggestion since I haven't looked into the issue but I would hope there would be some generic solution that doesn't require package-manager-specific handling.

@kazupon
Copy link
Collaborator Author

kazupon commented Nov 18, 2022

I know that this solution is terrible too.
I really struggle with different hoist patterns for different package managers...

@rchl
Copy link
Collaborator

rchl commented Nov 18, 2022

I don't have understanding on how it works in Nuxt 3 but in Nuxt 2 the issue was only with dependencies used in plugins since plugins were added in .nuxt/... where it might not resolve the same way as when importing from the module's package itself. So to fix those cases it was enough to create an alias during module execution and change plugins to import from that alias instead.

Is this is not enough in Nuxt 3 anymore?

And why would we need different alias resolving logic for different package managers? Resolving using "import" or "require" should in theory work more or less the same during module execution.

I know you are busy @danielroe and @pi0 but if you have some take on this then please share.

DarthGigi pushed a commit to DarthGigi/i18n that referenced this pull request Apr 16, 2024
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.

None yet

2 participants