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

docs: update note about auto-installing layer deps with git sources #24250

Merged
merged 4 commits into from
Jan 18, 2024

Conversation

Dominic-Marcelino
Copy link
Contributor

πŸ”— Linked issue

not available

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme or JSdoc annotations)
  • 🐞 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

With Nuxt 3.8.0 the dependencies behaviour for layers changed:

And probably one of the most significant changes - if you are using remote layers we now clone these within your node_modules/ folder (unjs/c12#109) so layers can use dependencies with your project. See c12 release notes for full details.

πŸ“ Checklist

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

Copy link

stackblitz bot commented Nov 11, 2023

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

Copy link
Contributor

nuxt-studio bot commented Nov 11, 2023

βœ… Live Preview ready!

Name Edit Preview Latest Commit
Nuxt Docs Edit on Studio β†—οΈŽ View Live Preview f33ab78

@DamianGlowala DamianGlowala changed the title docs: Update layers guide: Npm extensions in layers note docs: update note about auto-installing layer deps with git sources Nov 11, 2023
@MuhammadM1998
Copy link
Contributor

Have you tried this and worked? I've moved nuxt/ui in my base layer to dependencies and remove it from another repo where i'm extending the layer and I get the error can't find module nuxt/ui. I think this is also related unjs/c12#51.

@danielroe
Copy link
Member

I don't believe we auto-install dependencies. Rather, any dependencies that exist in both your layer and your final app can be accessed by the layer.

@danielroe
Copy link
Member

I'm closing this as it's not seen an update since my last comment. (Thank you though!) Let's get the feature working first πŸ™

@danielroe danielroe closed this Jan 17, 2024
@Dominic-Marcelino
Copy link
Contributor Author

Sorry, somehow missed to answer. Seems like I misunderstood the changelog and it only worked in my test due to not doing a clean dependency install. Thanks for getting back ☺️

@pi0
Copy link
Member

pi0 commented Jan 17, 2024

@danielroe it is supported btw in latest c12. We shall mention extends: [ ['layer', { install: true } ] ] possibility.

@danielroe danielroe reopened this Jan 17, 2024
@danielroe danielroe marked this pull request as ready for review January 17, 2024 12:17
@danielroe danielroe requested a review from pi0 January 17, 2024 12:18
@danielroe danielroe merged commit f3d81ef into nuxt:main Jan 18, 2024
4 checks passed
@github-actions github-actions bot mentioned this pull request Jan 18, 2024
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.

5 participants