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

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

Merged
pi0 merged 15 commits intomainfrom
refactor/schema
Oct 27, 2022
Merged

refactor(nuxt)!: cleanup schema and split nuxt 2 types#8487
pi0 merged 15 commits intomainfrom
refactor/schema

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

@TheAlexLichter
Copy link
Member

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
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

Development

Successfully merging this pull request may close these issues.

ssr : true gives TS error on routeRules More obvious deprecation of Nuxt 2 settings in nuxt.config.js Detect typos in nuxt.config

3 participants