mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-16 21:58:19 +00:00
Merge branch 'refs/heads/main' into feat-add-auto-import-directives
# Conflicts: # pnpm-lock.yaml
This commit is contained in:
commit
2461ed6fb1
@ -1,4 +1,4 @@
|
||||
FROM node:lts@sha256:48db4f6ea21d134be744207225753a1730c4bc1b4cdf836d44511c36bf0e34d7
|
||||
FROM node:lts@sha256:db5dd2f30cb82a8bdbd16acd4a8f3f2789f5b24f6ce43f98aa041be848c82e45
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -fy libnss3 libnspr4 libatk1.0-0 libatk-bridge2.0-0 libcups2 libdbus-1-3 libdrm2 libxkbcommon0 libatspi2.0-0 libxcomposite1 libxdamage1 libxfixes3 libxrandr2 libgbm1 libasound2 && \
|
||||
|
@ -64,6 +64,10 @@ By default, the workload gets distributed to the workers with the round robin st
|
||||
|
||||
:read-more{to="https://nitro.unjs.io/deploy/node" title="the Nitro documentation for node-server preset"}
|
||||
|
||||
::tip{icon="i-ph-video" to="https://www.youtube.com/watch?v=0x1H6K5yOfs" target="\_blank"}
|
||||
Watch Daniel Roe's short video on the topic.
|
||||
::
|
||||
|
||||
## Static Hosting
|
||||
|
||||
There are two ways to deploy a Nuxt application to any static hosting services:
|
||||
|
@ -33,7 +33,7 @@ Nuxt auto-imports functions and composables to perform [data fetching](/docs/get
|
||||
|
||||
```vue twoslash
|
||||
<script setup lang="ts">
|
||||
/* useAsyncData() and $fetch() are auto-imported */
|
||||
/* useFetch() is auto-imported */
|
||||
const { data, refresh, status } = await useFetch('/api/hello')
|
||||
</script>
|
||||
```
|
||||
|
@ -82,6 +82,10 @@ const MyButton = resolveComponent('MyButton')
|
||||
If you are using `resolveComponent` to handle dynamic components, make sure not to insert anything but the name of the component, which must be a string and not a variable.
|
||||
::
|
||||
|
||||
::tip{icon="i-ph-video" to="https://www.youtube.com/watch?v=4kq8E5IUM2U" target="\_blank"}
|
||||
Watch Daniel Roe's short video about `resolveComponent`.
|
||||
::
|
||||
|
||||
Alternatively, though not recommended, you can register all your components globally, which will create async chunks for all your components and make them available throughout your application.
|
||||
|
||||
```diff
|
||||
|
16
package.json
16
package.json
@ -39,10 +39,10 @@
|
||||
"@nuxt/ui-templates": "workspace:*",
|
||||
"@nuxt/vite-builder": "workspace:*",
|
||||
"@nuxt/webpack-builder": "workspace:*",
|
||||
"@types/node": "20.16.9",
|
||||
"@vue/compiler-core": "3.5.9",
|
||||
"@vue/compiler-dom": "3.5.9",
|
||||
"@vue/shared": "3.5.9",
|
||||
"@types/node": "20.16.10",
|
||||
"@vue/compiler-core": "3.5.10",
|
||||
"@vue/compiler-dom": "3.5.10",
|
||||
"@vue/shared": "3.5.10",
|
||||
"c12": "2.0.0-beta.3",
|
||||
"h3": "npm:h3-nightly@2.0.0-1718872656.6765a6e",
|
||||
"jiti": "2.0.0",
|
||||
@ -51,13 +51,13 @@
|
||||
"nuxt": "workspace:*",
|
||||
"ohash": "1.1.4",
|
||||
"postcss": "8.4.47",
|
||||
"rollup": "4.22.4",
|
||||
"rollup": "4.22.5",
|
||||
"send": ">=0.19.0",
|
||||
"typescript": "5.6.2",
|
||||
"ufo": "1.5.4",
|
||||
"unbuild": "3.0.0-rc.8",
|
||||
"vite": "5.4.8",
|
||||
"vue": "3.5.9"
|
||||
"vue": "3.5.10"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "9.11.1",
|
||||
@ -67,7 +67,7 @@
|
||||
"@nuxt/webpack-builder": "workspace:*",
|
||||
"@testing-library/vue": "8.1.0",
|
||||
"@types/eslint__js": "8.42.3",
|
||||
"@types/node": "20.16.9",
|
||||
"@types/node": "20.16.10",
|
||||
"@types/semver": "7.5.8",
|
||||
"@unhead/schema": "1.11.6",
|
||||
"@unhead/vue": "1.11.6",
|
||||
@ -106,7 +106,7 @@
|
||||
"ufo": "1.5.4",
|
||||
"vitest": "2.1.1",
|
||||
"vitest-environment-nuxt": "1.0.1",
|
||||
"vue": "3.5.9",
|
||||
"vue": "3.5.10",
|
||||
"vue-router": "4.4.5",
|
||||
"vue-tsc": "2.1.6"
|
||||
},
|
||||
|
@ -69,7 +69,7 @@
|
||||
"@unhead/shared": "^1.11.6",
|
||||
"@unhead/ssr": "^1.11.6",
|
||||
"@unhead/vue": "^1.11.6",
|
||||
"@vue/shared": "^3.5.9",
|
||||
"@vue/shared": "^3.5.10",
|
||||
"acorn": "8.12.1",
|
||||
"c12": "^2.0.0-beta.3",
|
||||
"chokidar": "^3.6.0",
|
||||
@ -119,7 +119,7 @@
|
||||
"unplugin-vue-router": "^0.10.8",
|
||||
"unstorage": "^1.12.0",
|
||||
"untyped": "^1.5.0",
|
||||
"vue": "^3.5.9",
|
||||
"vue": "^3.5.10",
|
||||
"vue-bundle-renderer": "^2.1.1",
|
||||
"vue-devtools-stub": "^0.1.0",
|
||||
"vue-router": "^4.4.5"
|
||||
@ -130,7 +130,7 @@
|
||||
"@parcel/watcher": "2.4.1",
|
||||
"@types/estree": "1.0.6",
|
||||
"@vitejs/plugin-vue": "5.1.4",
|
||||
"@vue/compiler-sfc": "3.5.9",
|
||||
"@vue/compiler-sfc": "3.5.10",
|
||||
"unbuild": "3.0.0-rc.8",
|
||||
"vite": "5.4.8",
|
||||
"vitest": "2.1.1"
|
||||
|
@ -42,8 +42,8 @@
|
||||
"@unhead/schema": "1.11.6",
|
||||
"@vitejs/plugin-vue": "5.1.4",
|
||||
"@vitejs/plugin-vue-jsx": "4.0.1",
|
||||
"@vue/compiler-core": "3.5.9",
|
||||
"@vue/compiler-sfc": "3.5.9",
|
||||
"@vue/compiler-core": "3.5.10",
|
||||
"@vue/compiler-sfc": "3.5.10",
|
||||
"@vue/language-core": "2.1.6",
|
||||
"c12": "2.0.0-beta.3",
|
||||
"esbuild-loader": "4.2.2",
|
||||
@ -55,7 +55,7 @@
|
||||
"unctx": "2.3.1",
|
||||
"unenv": "1.10.0",
|
||||
"vite": "5.4.8",
|
||||
"vue": "3.5.9",
|
||||
"vue": "3.5.10",
|
||||
"vue-bundle-renderer": "2.1.1",
|
||||
"vue-loader": "17.4.2",
|
||||
"vue-router": "4.4.5",
|
||||
|
@ -27,9 +27,9 @@
|
||||
"@nuxt/schema": "workspace:*",
|
||||
"@types/clear": "0.1.4",
|
||||
"@types/estree": "1.0.6",
|
||||
"rollup": "4.22.4",
|
||||
"rollup": "4.22.5",
|
||||
"unbuild": "3.0.0-rc.8",
|
||||
"vue": "3.5.9"
|
||||
"vue": "3.5.10"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nuxt/kit": "workspace:*",
|
||||
|
@ -78,9 +78,9 @@
|
||||
"@types/pify": "5.0.4",
|
||||
"@types/webpack-bundle-analyzer": "4.7.0",
|
||||
"@types/webpack-hot-middleware": "2.25.9",
|
||||
"rollup": "4.22.4",
|
||||
"rollup": "4.22.5",
|
||||
"unbuild": "3.0.0-rc.8",
|
||||
"vue": "3.5.9"
|
||||
"vue": "3.5.10"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"vue": "^3.3.4"
|
||||
|
927
pnpm-lock.yaml
927
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
@ -78,7 +78,7 @@ describe.skipIf(process.env.SKIP_BUNDLE_SIZE === 'true' || process.env.ECOSYSTEM
|
||||
const serverDir = join(rootDir, '.output-inline/server')
|
||||
|
||||
const serverStats = await analyzeSizes(['**/*.mjs', '!node_modules'], serverDir)
|
||||
expect.soft(roundToKilobytes(serverStats.totalBytes)).toMatchInlineSnapshot(`"557k"`)
|
||||
expect.soft(roundToKilobytes(serverStats.totalBytes)).toMatchInlineSnapshot(`"558k"`)
|
||||
|
||||
const modules = await analyzeSizes(['node_modules/**/*'], serverDir)
|
||||
expect.soft(roundToKilobytes(modules.totalBytes)).toMatchInlineSnapshot(`"93.8k"`)
|
||||
|
Loading…
Reference in New Issue
Block a user