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

refactor(nuxt)!: cleanup schema and split nuxt 2 types #8487

Merged
merged 15 commits into from Oct 27, 2022
Merged

Conversation

pi0
Copy link
Member

@pi0 pi0 commented Oct 26, 2022

πŸ”— Linked issue

Resolves nuxt/nuxt#14135, resolves nuxt/nuxt#15006, resolves nuxt/nuxt#15199

❓ 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

Initially, we started Nuxt 3 project by documenting all possible configs from Nuxt 2 into @nuxt/schema alongside with @nuxt/bridge code. Over time it becomes both complex to maintain and also confusing UX because you can see auto-completion of options from nuxt.config that are not working with Nuxt 3.

Changes by this PR:

Breaking changes:

  • Unknown and Nuxt2-only options are not allowed in nuxt.config
  • serverMiddleware config is not supported anymore (use serverHandlers or devServerHandlers)
  • addServerMiddleware kit utility is removed
  • webpack:devMiddleware and webpack:hotMiddleware hooks unsupported
  • build:compile and build:compiled hooks renamed to webpack:compile and webpack:compiled
  • build:resources hook is unsupported (use vite:compiled and webpack:compiled)
  • build:before, build:done, modules:before and modules:done take no arguments
  • bundler:change, bundler:error, bundler:done and bundler:progress hooks renamed with webpack: prefix
  • options.env and options.target, and options.build.quite are not used anymore by webpack builder

πŸ“ Checklist

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

@codesandbox
Copy link

codesandbox bot commented Oct 26, 2022

CodeSandbox logoCodeSandbox logoΒ  Open in CodeSandbox Web Editor | VS Code | VS Code Insiders

@netlify
Copy link

netlify bot commented Oct 26, 2022

βœ… Deploy Preview for nuxt3-docs canceled.

Name Link
πŸ”¨ Latest commit 27296d2
πŸ” Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/635a5efab4e28900087b2034

@manniL
Copy link
Member

manniL commented Oct 26, 2022

This also resolves nuxt/nuxt#15006, right?

@pi0 pi0 mentioned this pull request Oct 26, 2022
7 tasks
@pi0 pi0 marked this pull request as ready for review October 26, 2022 12:40
@pi0 pi0 requested a review from danielroe October 26, 2022 13:30
packages/schema/src/config/router.ts Outdated Show resolved Hide resolved
packages/nuxt/src/core/nitro.ts Outdated Show resolved Hide resolved
pi0 and others added 2 commits October 26, 2022 15:51
@pi0
Copy link
Member Author

pi0 commented Oct 27, 2022

(this PR has probably some more breaking changes and unwanted regressions as well. merging earlier to find them out via edge channel)

@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
3 participants