@nuxt/docs-nightly 5.0.0-2611231312-bc2bbde → 5.0.0-2611231610-fa01a6d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -961,6 +961,12 @@ Server code should import from `#imports/server`:
|
|
|
961
961
|
|
|
962
962
|
`#imports` still resolves when your server code runs, so an unmigrated project keeps working, but it is no longer typed: TypeScript reports it as unresolved until you move to `#imports/server`.
|
|
963
963
|
|
|
964
|
+
#### Server Imports Must Be Declared in `package.json`
|
|
965
|
+
|
|
966
|
+
An import that Nitro v3 can't resolve stays external, in development and in the build output, so `nuxt dev` fails at startup with `Cannot find package 'ufo' imported from .nuxt/dev/index.mjs`, and a built server fails on a route that reaches the import. Nitro v2 resolved such imports from Nuxt's own dependency tree.
|
|
967
|
+
|
|
968
|
+
Declare every package your server code imports in your `package.json`.
|
|
969
|
+
|
|
964
970
|
#### Error Handling: `status`/`statusText` replace `statusCode`/`statusMessage`
|
|
965
971
|
|
|
966
972
|
h3 v2 renames the error properties to align with Web standards:
|