Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

fix(nuxt): narrow nuxt.config import protection #6279

Merged
merged 2 commits into from
Aug 1, 2022
Merged

fix(nuxt): narrow nuxt.config import protection #6279

merged 2 commits into from
Aug 1, 2022

Conversation

danielroe
Copy link
Member

πŸ”— Linked issue

resolves nuxt/nuxt#14461

❓ 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)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

This narrows down import protection for nuxt.config. Vite will pass the id /nuxt.config.ts even when aliased or relative imports are used. Webpack will pass the full ID so it's possible to devise imports that won't be caught (but the import of defineNuxtConfig from nuxt will be caught).

πŸ“ Checklist

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

@danielroe danielroe added bug Something isn't working πŸ”¨ p3-minor-bug Priority 3: a bug in an edge case that only affects very specific usage labels Aug 1, 2022
@danielroe danielroe requested a review from pi0 August 1, 2022 12:39
@danielroe danielroe self-assigned this Aug 1, 2022
@netlify
Copy link

netlify bot commented Aug 1, 2022

βœ… Deploy Preview for nuxt3-docs canceled.

Name Link
πŸ”¨ Latest commit 7b80db1
πŸ” Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/62e7c99e1af176000842271e

@pi0 pi0 merged commit b12fe7e into main Aug 1, 2022
@pi0 pi0 deleted the fix/nuxt-import branch August 1, 2022 17:25
@pi0 pi0 mentioned this pull request Aug 5, 2022
@danielroe danielroe added the 3.x label Jan 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
3.x bug Something isn't working πŸ”¨ p3-minor-bug Priority 3: a bug in an edge case that only affects very specific usage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

False error thrown if page hierarchy contains file or folder with the name "nuxt.config"
2 participants