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

feat(kit): support config extends using unjs/c12 #3008

Merged
merged 3 commits into from
Jan 31, 2022
Merged

feat(kit): support config extends using unjs/c12 #3008

merged 3 commits into from
Jan 31, 2022

Conversation

pi0
Copy link
Member

@pi0 pi0 commented Jan 31, 2022

πŸ”— Linked issue

❓ 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

Use unjs/c12 for loading configuration. This allows easier future developments with a well-tested library and share standard config loading mechanism as a standalone utility.

This PR migration adds a new functionality to nuxt.config. With a new extends key, we can extend nested levels of nuxt config or even fetch from remote git source!

// nuxt.config
export default defineNuxtConfig({
  extends: [
     './nuxt.config.dev',
     './base',
    'github:nuxt/theme'
  ]
})

Config layers are available as nuxt.options.layers. Each module can optionally use it for extended merging functionality.

πŸ“ Checklist

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

@netlify
Copy link

netlify bot commented Jan 31, 2022

βœ”οΈ Deploy Preview for nuxt3-docs canceled.

πŸ”¨ Explore the source changes: 2c107a7

πŸ” Inspect the deploy log: https://app.netlify.com/sites/nuxt3-docs/deploys/61f8309cbf97280007a8a758

@pi0 pi0 changed the title refactor: use unjs/c12 for loading configuration feat: support config extends using unjs/c12 Jan 31, 2022
@pi0 pi0 changed the title feat: support config extends using unjs/c12 feat(kit): support config extends using unjs/c12 Jan 31, 2022
@pi0 pi0 merged commit 1672148 into main Jan 31, 2022
@pi0 pi0 deleted the refactor/c12 branch January 31, 2022 21:13
@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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants