mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-21 16:09:52 +00:00
Compare commits
8 Commits
9c096a4a10
...
bd2df9413c
Author | SHA1 | Date | |
---|---|---|---|
|
bd2df9413c | ||
|
160efe7a7f | ||
|
323745d0d4 | ||
|
66c3549e1e | ||
|
56a84a1fe4 | ||
|
ce6d3c1b9e | ||
|
a3c63cd9d6 | ||
|
b3d5c9836e |
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -236,7 +236,7 @@ jobs:
|
||||
path: packages
|
||||
|
||||
- name: Run benchmarks
|
||||
uses: CodSpeedHQ/action@da7c57859a7a565a3a92789ac64c41aca031ca1f # v3.3.0
|
||||
uses: CodSpeedHQ/action@1015f4f828ff74b7a950909897fe581d6ba868cc # v3.3.1
|
||||
with:
|
||||
run: pnpm vitest bench
|
||||
token: ${{ secrets.CODSPEED_TOKEN }}
|
||||
|
36
package.json
36
package.json
@ -37,7 +37,7 @@
|
||||
"typecheck:docs": "DOCS_TYPECHECK=true pnpm nuxi prepare && nuxt-content-twoslash verify --content-dir docs --languages html"
|
||||
},
|
||||
"resolutions": {
|
||||
"@babel/core": "7.26.8",
|
||||
"@babel/core": "7.26.9",
|
||||
"@babel/helper-plugin-utils": "7.26.5",
|
||||
"@nuxt/cli": "3.21.1",
|
||||
"@nuxt/kit": "workspace:*",
|
||||
@ -45,12 +45,12 @@
|
||||
"@nuxt/schema": "workspace:*",
|
||||
"@nuxt/vite-builder": "workspace:*",
|
||||
"@nuxt/webpack-builder": "workspace:*",
|
||||
"@types/node": "22.13.2",
|
||||
"@unhead/dom": "1.11.18",
|
||||
"@unhead/schema": "1.11.18",
|
||||
"@unhead/shared": "1.11.18",
|
||||
"@unhead/ssr": "1.11.18",
|
||||
"@unhead/vue": "1.11.18",
|
||||
"@types/node": "22.13.4",
|
||||
"@unhead/dom": "1.11.19",
|
||||
"@unhead/schema": "1.11.19",
|
||||
"@unhead/shared": "1.11.19",
|
||||
"@unhead/ssr": "1.11.19",
|
||||
"@unhead/vue": "1.11.19",
|
||||
"@vue/compiler-core": "3.5.13",
|
||||
"@vue/compiler-dom": "3.5.13",
|
||||
"@vue/shared": "3.5.13",
|
||||
@ -62,19 +62,19 @@
|
||||
"nuxt": "workspace:*",
|
||||
"ohash": "1.1.4",
|
||||
"postcss": "8.5.2",
|
||||
"rollup": "4.34.6",
|
||||
"rollup": "4.34.8",
|
||||
"send": ">=1.1.0",
|
||||
"typescript": "5.7.3",
|
||||
"ufo": "1.5.4",
|
||||
"unbuild": "3.3.1",
|
||||
"unhead": "1.11.18",
|
||||
"unimport": "4.1.1",
|
||||
"unhead": "1.11.19",
|
||||
"unimport": "4.1.2",
|
||||
"vite": "6.1.0",
|
||||
"vue": "3.5.13"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@arethetypeswrong/cli": "0.17.3",
|
||||
"@babel/core": "7.26.8",
|
||||
"@babel/core": "7.26.9",
|
||||
"@babel/helper-plugin-utils": "7.26.5",
|
||||
"@codspeed/vitest-plugin": "4.0.0",
|
||||
"@nuxt/cli": "3.21.1",
|
||||
@ -86,10 +86,10 @@
|
||||
"@testing-library/vue": "8.1.0",
|
||||
"@types/babel__core": "7.20.5",
|
||||
"@types/babel__helper-plugin-utils": "7.10.3",
|
||||
"@types/node": "22.13.2",
|
||||
"@types/node": "22.13.4",
|
||||
"@types/semver": "7.5.8",
|
||||
"@unhead/schema": "1.11.18",
|
||||
"@unhead/vue": "1.11.18",
|
||||
"@unhead/schema": "1.11.19",
|
||||
"@unhead/vue": "1.11.19",
|
||||
"@vitest/coverage-v8": "3.0.5",
|
||||
"@vue/test-utils": "2.4.6",
|
||||
"acorn": "8.14.0",
|
||||
@ -120,12 +120,12 @@
|
||||
"pathe": "2.0.3",
|
||||
"pkg-pr-new": "0.0.39",
|
||||
"playwright-core": "1.50.1",
|
||||
"rollup": "4.34.6",
|
||||
"rollup": "4.34.8",
|
||||
"semver": "7.7.1",
|
||||
"sherif": "1.3.0",
|
||||
"std-env": "3.8.0",
|
||||
"tinyexec": "0.3.2",
|
||||
"tinyglobby": "0.2.10",
|
||||
"tinyglobby": "0.2.11",
|
||||
"ts-blank-space": "0.6.0",
|
||||
"typescript": "5.7.3",
|
||||
"ufo": "1.5.4",
|
||||
@ -133,9 +133,9 @@
|
||||
"vitest": "3.0.5",
|
||||
"vitest-environment-nuxt": "1.0.1",
|
||||
"vue": "3.5.13",
|
||||
"vue-tsc": "2.2.0",
|
||||
"vue-tsc": "2.2.2",
|
||||
"webpack": "5.98.0"
|
||||
},
|
||||
"packageManager": "pnpm@10.3.0",
|
||||
"packageManager": "pnpm@10.4.1",
|
||||
"version": ""
|
||||
}
|
||||
|
@ -45,7 +45,7 @@
|
||||
"std-env": "^3.8.0",
|
||||
"ufo": "^1.5.4",
|
||||
"unctx": "^2.4.1",
|
||||
"unimport": "^4.1.1",
|
||||
"unimport": "^4.1.2",
|
||||
"untyped": "^1.5.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
@ -66,15 +66,15 @@
|
||||
"dependencies": {
|
||||
"@nuxt/cli": "^3.21.1",
|
||||
"@nuxt/devalue": "^2.0.2",
|
||||
"@nuxt/devtools": "^2.0.0",
|
||||
"@nuxt/devtools": "^2.1.0",
|
||||
"@nuxt/kit": "workspace:*",
|
||||
"@nuxt/schema": "workspace:*",
|
||||
"@nuxt/telemetry": "^2.6.5",
|
||||
"@nuxt/vite-builder": "workspace:*",
|
||||
"@unhead/dom": "^1.11.18",
|
||||
"@unhead/shared": "^1.11.18",
|
||||
"@unhead/ssr": "^1.11.18",
|
||||
"@unhead/vue": "^1.11.18",
|
||||
"@unhead/dom": "^1.11.19",
|
||||
"@unhead/shared": "^1.11.19",
|
||||
"@unhead/ssr": "^1.11.19",
|
||||
"@unhead/vue": "^1.11.19",
|
||||
"@vue/shared": "^3.5.13",
|
||||
"acorn": "8.14.0",
|
||||
"c12": "^2.0.2",
|
||||
@ -113,14 +113,14 @@
|
||||
"semver": "^7.7.1",
|
||||
"std-env": "^3.8.0",
|
||||
"strip-literal": "^3.0.0",
|
||||
"tinyglobby": "0.2.10",
|
||||
"tinyglobby": "0.2.11",
|
||||
"ufo": "^1.5.4",
|
||||
"ultrahtml": "^1.5.3",
|
||||
"uncrypto": "^0.1.3",
|
||||
"unctx": "^2.4.1",
|
||||
"unenv": "^1.10.0",
|
||||
"unhead": "^1.11.18",
|
||||
"unimport": "^4.1.1",
|
||||
"unhead": "^1.11.19",
|
||||
"unimport": "^4.1.2",
|
||||
"unplugin": "^2.2.0",
|
||||
"unplugin-vue-router": "^0.11.2",
|
||||
"unstorage": "^1.14.4",
|
||||
@ -131,7 +131,7 @@
|
||||
"vue-router": "^4.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nuxt/scripts": "0.10.1",
|
||||
"@nuxt/scripts": "0.10.3",
|
||||
"@parcel/watcher": "2.5.1",
|
||||
"@types/estree": "1.0.6",
|
||||
"@vitejs/plugin-vue": "5.2.1",
|
||||
|
@ -9,12 +9,10 @@ import { appManifest as isAppManifestEnabled } from '#build/nuxt.config.mjs'
|
||||
export default defineNuxtPlugin({
|
||||
name: 'nuxt:payload',
|
||||
setup (nuxtApp) {
|
||||
// TODO: Support dev
|
||||
if (import.meta.dev) { return }
|
||||
|
||||
// Load payload after middleware & once final route is resolved
|
||||
useRouter().beforeResolve(async (to, from) => {
|
||||
if (to.path === from.path) { return }
|
||||
// Forcefully load payload in dev mode, to support payload extraction at page refresh.
|
||||
if (to.path === from.path && !import.meta.dev) { return }
|
||||
const payload = await loadPayload(to.path)
|
||||
if (!payload) { return }
|
||||
Object.assign(nuxtApp.static.data, payload.data)
|
||||
|
@ -659,7 +659,7 @@ async function initNuxt (nuxt: Nuxt) {
|
||||
}
|
||||
|
||||
// Add prerender payload support
|
||||
if (!nuxt.options.dev && nuxt.options.experimental.payloadExtraction) {
|
||||
if (nuxt.options.experimental.payloadExtraction) {
|
||||
addPlugin(resolve(nuxt.options.appDir, 'plugins/payload.client'))
|
||||
}
|
||||
|
||||
@ -779,10 +779,6 @@ export default defineNuxtPlugin({
|
||||
nitro.options.replace['process.env.NUXT_PAYLOAD_EXTRACTION'] = String(!!nuxt.options.experimental.payloadExtraction)
|
||||
nitro.options._config.replace!['process.env.NUXT_PAYLOAD_EXTRACTION'] = String(!!nuxt.options.experimental.payloadExtraction)
|
||||
|
||||
if (!nuxt.options.dev && nuxt.options.experimental.payloadExtraction) {
|
||||
addPlugin(resolve(nuxt.options.appDir, 'plugins/payload.client'))
|
||||
}
|
||||
|
||||
// Show compatibility version banner when Nuxt is running with a compatibility version
|
||||
// that is different from the current major version
|
||||
if (!(satisfies(nuxt._version, nuxt.options.future.compatibilityVersion + '.x'))) {
|
||||
|
@ -325,7 +325,9 @@ export default defineRenderHandler(async (event): Promise<Partial<RenderResponse
|
||||
// Whether we are prerendering route
|
||||
const _PAYLOAD_EXTRACTION = import.meta.prerender && process.env.NUXT_PAYLOAD_EXTRACTION && !ssrContext.noSSR && !isRenderingIsland
|
||||
const payloadURL = _PAYLOAD_EXTRACTION ? joinURL(ssrContext.runtimeConfig.app.cdnURL || ssrContext.runtimeConfig.app.baseURL, url, process.env.NUXT_JSON_PAYLOADS ? '_payload.json' : '_payload.js') + '?' + ssrContext.runtimeConfig.app.buildId : undefined
|
||||
if (import.meta.prerender) {
|
||||
|
||||
const pagePrerenderedInDev = import.meta.dev && (!!routeOptions.prerender || isRenderingPayload)
|
||||
if (pagePrerenderedInDev || import.meta.prerender) {
|
||||
ssrContext.payload.prerenderedAt = Date.now()
|
||||
}
|
||||
|
||||
|
@ -39,10 +39,6 @@ describe('resolveApp', () => {
|
||||
},
|
||||
],
|
||||
"plugins": [
|
||||
{
|
||||
"mode": "client",
|
||||
"src": "<repoRoot>/packages/nuxt/src/app/plugins/payload.client.ts",
|
||||
},
|
||||
{
|
||||
"mode": "client",
|
||||
"src": "<repoRoot>/packages/nuxt/src/app/plugins/navigation-repaint.client.ts",
|
||||
@ -63,6 +59,10 @@ describe('resolveApp', () => {
|
||||
"mode": "client",
|
||||
"src": "<repoRoot>/packages/nuxt/src/app/plugins/chunk-reload.client.ts",
|
||||
},
|
||||
{
|
||||
"mode": "client",
|
||||
"src": "<repoRoot>/packages/nuxt/src/app/plugins/payload.client.ts",
|
||||
},
|
||||
{
|
||||
"filename": "components.plugin.mjs",
|
||||
"getContents": [Function],
|
||||
|
@ -75,7 +75,7 @@
|
||||
"@types/pify": "5.0.4",
|
||||
"@types/webpack-bundle-analyzer": "4.7.0",
|
||||
"@types/webpack-hot-middleware": "2.25.9",
|
||||
"rollup": "4.34.6",
|
||||
"rollup": "4.34.8",
|
||||
"unbuild": "3.3.1",
|
||||
"vue": "3.5.13"
|
||||
},
|
||||
|
@ -40,12 +40,12 @@
|
||||
"@types/rollup-plugin-visualizer": "4.2.4",
|
||||
"@types/webpack-bundle-analyzer": "4.7.0",
|
||||
"@types/webpack-hot-middleware": "2.25.9",
|
||||
"@unhead/schema": "1.11.18",
|
||||
"@unhead/schema": "1.11.19",
|
||||
"@vitejs/plugin-vue": "5.2.1",
|
||||
"@vitejs/plugin-vue-jsx": "4.1.1",
|
||||
"@vue/compiler-core": "3.5.13",
|
||||
"@vue/compiler-sfc": "3.5.13",
|
||||
"@vue/language-core": "2.2.0",
|
||||
"@vue/language-core": "2.2.2",
|
||||
"c12": "2.0.2",
|
||||
"chokidar": "4.0.3",
|
||||
"compatx": "0.1.8",
|
||||
@ -61,11 +61,11 @@
|
||||
"ofetch": "1.4.1",
|
||||
"pkg-types": "1.3.1",
|
||||
"postcss": "8.5.2",
|
||||
"sass-loader": "16.0.4",
|
||||
"sass-loader": "16.0.5",
|
||||
"scule": "1.3.0",
|
||||
"unbuild": "3.3.1",
|
||||
"unctx": "2.4.1",
|
||||
"unimport": "4.1.1",
|
||||
"unimport": "4.1.2",
|
||||
"untyped": "1.5.2",
|
||||
"vite": "6.1.0",
|
||||
"vue": "3.5.13",
|
||||
|
@ -17,9 +17,9 @@
|
||||
"prerender": "pnpm build && jiti ./lib/prerender"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@unocss/reset": "65.4.3",
|
||||
"@unocss/reset": "66.0.0",
|
||||
"beasties": "0.2.0",
|
||||
"html-validate": "9.2.2",
|
||||
"html-validate": "9.3.0",
|
||||
"htmlnano": "2.1.1",
|
||||
"jiti": "2.4.2",
|
||||
"knitwork": "1.2.0",
|
||||
@ -28,8 +28,8 @@
|
||||
"scule": "1.3.0",
|
||||
"svgo": "3.3.2",
|
||||
"tinyexec": "0.3.2",
|
||||
"tinyglobby": "0.2.10",
|
||||
"unocss": "65.4.3",
|
||||
"tinyglobby": "0.2.11",
|
||||
"unocss": "66.0.0",
|
||||
"vite": "6.1.0"
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nuxt/schema": "workspace:*",
|
||||
"rollup": "4.34.6",
|
||||
"rollup": "4.34.8",
|
||||
"unbuild": "3.3.1",
|
||||
"vue": "3.5.13"
|
||||
},
|
||||
|
@ -77,7 +77,7 @@
|
||||
"@types/pify": "5.0.4",
|
||||
"@types/webpack-bundle-analyzer": "4.7.0",
|
||||
"@types/webpack-hot-middleware": "2.25.9",
|
||||
"rollup": "4.34.6",
|
||||
"rollup": "4.34.8",
|
||||
"unbuild": "3.3.1",
|
||||
"vue": "3.5.13"
|
||||
},
|
||||
|
1447
pnpm-lock.yaml
1447
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user