mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-13 09:33:54 +00:00
chore(deps): update all non-major dependencies (3.x) (#29524)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Daniel Roe <daniel@roe.dev>
This commit is contained in:
parent
3bbcd7d218
commit
dadf50dbcd
2
.github/workflows/benchmark.yml
vendored
2
.github/workflows/benchmark.yml
vendored
@ -46,7 +46,7 @@ jobs:
|
||||
run: pnpm build
|
||||
|
||||
- name: Run benchmarks
|
||||
uses: CodSpeedHQ/action@ab07afd34cbbb7a1306e8d14b7cc44e029eee37a # v3.0.0
|
||||
uses: CodSpeedHQ/action@b587655f756aab640e742fec141261bc6f0a569d # v3.0.1
|
||||
with:
|
||||
run: pnpm vitest bench
|
||||
token: ${{ secrets.CODSPEED_TOKEN }}
|
||||
|
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@ -75,7 +75,7 @@ jobs:
|
||||
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v3.26.12
|
||||
uses: github/codeql-action/init@f779452ac5af1c261dce0346a8f964149f49322b # v3.26.13
|
||||
with:
|
||||
config: |
|
||||
paths:
|
||||
@ -91,7 +91,7 @@ jobs:
|
||||
queries: +security-and-quality
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v3.26.12
|
||||
uses: github/codeql-action/analyze@f779452ac5af1c261dce0346a8f964149f49322b # v3.26.13
|
||||
with:
|
||||
category: "/language:javascript-typescript"
|
||||
|
||||
|
2
.github/workflows/scorecards.yml
vendored
2
.github/workflows/scorecards.yml
vendored
@ -68,7 +68,7 @@ jobs:
|
||||
|
||||
# Upload the results to GitHub's code scanning dashboard.
|
||||
- name: "Upload to code-scanning"
|
||||
uses: github/codeql-action/upload-sarif@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v3.26.12
|
||||
uses: github/codeql-action/upload-sarif@f779452ac5af1c261dce0346a8f964149f49322b # v3.26.13
|
||||
if: github.repository == 'nuxt/nuxt' && success()
|
||||
with:
|
||||
sarif_file: results.sarif
|
||||
|
@ -3,8 +3,6 @@
|
||||
import { addPluginTemplate, addRouteMiddleware } from 'nuxt/kit'
|
||||
|
||||
export default defineNuxtConfig({
|
||||
typescript: { shim: process.env.DOCS_TYPECHECK === 'true' },
|
||||
pages: process.env.DOCS_TYPECHECK === 'true',
|
||||
modules: [
|
||||
function () {
|
||||
if (!process.env.DOCS_TYPECHECK) { return }
|
||||
@ -18,4 +16,6 @@ export default defineNuxtConfig({
|
||||
})
|
||||
},
|
||||
],
|
||||
pages: process.env.DOCS_TYPECHECK === 'true',
|
||||
typescript: { shim: process.env.DOCS_TYPECHECK === 'true' },
|
||||
})
|
||||
|
18
package.json
18
package.json
@ -52,12 +52,12 @@
|
||||
"send": ">=1.1.0",
|
||||
"typescript": "5.6.3",
|
||||
"ufo": "1.5.4",
|
||||
"vite": "5.4.8",
|
||||
"vite": "5.4.9",
|
||||
"vue": "3.5.12"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "9.12.0",
|
||||
"@nuxt/eslint-config": "0.5.7",
|
||||
"@nuxt/eslint-config": "0.6.0",
|
||||
"@nuxt/kit": "workspace:*",
|
||||
"@nuxt/rspack-builder": "workspace:*",
|
||||
"@nuxt/test-utils": "3.14.3",
|
||||
@ -66,8 +66,8 @@
|
||||
"@types/eslint__js": "8.42.3",
|
||||
"@types/node": "20.16.11",
|
||||
"@types/semver": "7.5.8",
|
||||
"@unhead/schema": "1.11.7",
|
||||
"@unhead/vue": "1.11.7",
|
||||
"@unhead/schema": "1.11.10",
|
||||
"@unhead/vue": "1.11.10",
|
||||
"@vitejs/plugin-vue": "5.1.4",
|
||||
"@vitest/coverage-v8": "2.1.2",
|
||||
"@vue/test-utils": "2.4.6",
|
||||
@ -80,7 +80,7 @@
|
||||
"devalue": "5.1.1",
|
||||
"eslint": "9.12.0",
|
||||
"eslint-plugin-no-only-tests": "3.3.0",
|
||||
"eslint-plugin-perfectionist": "3.8.0",
|
||||
"eslint-plugin-perfectionist": "3.9.0",
|
||||
"eslint-typegen": "0.3.2",
|
||||
"h3": "1.12.0",
|
||||
"happy-dom": "15.7.4",
|
||||
@ -92,12 +92,12 @@
|
||||
"nuxt-content-twoslash": "0.1.1",
|
||||
"ofetch": "1.4.1",
|
||||
"pathe": "1.1.2",
|
||||
"playwright-core": "1.48.0",
|
||||
"playwright-core": "1.48.1",
|
||||
"rimraf": "6.0.1",
|
||||
"semver": "7.6.3",
|
||||
"sherif": "1.0.0",
|
||||
"sherif": "1.0.1",
|
||||
"std-env": "3.7.0",
|
||||
"tinyexec": "0.3.0",
|
||||
"tinyexec": "0.3.1",
|
||||
"tinyglobby": "0.2.9",
|
||||
"typescript": "5.6.3",
|
||||
"ufo": "1.5.4",
|
||||
@ -107,7 +107,7 @@
|
||||
"vue-router": "4.4.5",
|
||||
"vue-tsc": "2.1.6"
|
||||
},
|
||||
"packageManager": "pnpm@9.12.1",
|
||||
"packageManager": "pnpm@9.12.2",
|
||||
"engines": {
|
||||
"node": "^16.10.0 || >=18.0.0"
|
||||
},
|
||||
|
@ -48,14 +48,14 @@
|
||||
"untyped": "^1.5.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@rspack/core": "1.0.10",
|
||||
"@rspack/core": "1.0.13",
|
||||
"@types/hash-sum": "1.0.2",
|
||||
"@types/lodash-es": "4.17.12",
|
||||
"@types/semver": "7.5.8",
|
||||
"lodash-es": "4.17.21",
|
||||
"nitropack": "2.9.7",
|
||||
"unbuild": "latest",
|
||||
"vite": "5.4.8",
|
||||
"vite": "5.4.9",
|
||||
"vitest": "2.1.2",
|
||||
"webpack": "5.95.0"
|
||||
},
|
||||
|
@ -65,12 +65,12 @@
|
||||
"@nuxt/schema": "workspace:*",
|
||||
"@nuxt/telemetry": "^2.6.0",
|
||||
"@nuxt/vite-builder": "workspace:*",
|
||||
"@unhead/dom": "^1.11.7",
|
||||
"@unhead/shared": "^1.11.7",
|
||||
"@unhead/ssr": "^1.11.7",
|
||||
"@unhead/vue": "^1.11.7",
|
||||
"@unhead/dom": "^1.11.10",
|
||||
"@unhead/shared": "^1.11.10",
|
||||
"@unhead/ssr": "^1.11.10",
|
||||
"@unhead/vue": "^1.11.10",
|
||||
"@vue/shared": "^3.5.12",
|
||||
"acorn": "8.12.1",
|
||||
"acorn": "8.13.0",
|
||||
"c12": "^2.0.1",
|
||||
"chokidar": "^4.0.1",
|
||||
"compatx": "^0.1.8",
|
||||
@ -113,7 +113,7 @@
|
||||
"uncrypto": "^0.1.3",
|
||||
"unctx": "^2.3.1",
|
||||
"unenv": "^1.10.0",
|
||||
"unhead": "^1.11.7",
|
||||
"unhead": "^1.11.10",
|
||||
"unimport": "^3.13.1",
|
||||
"unplugin": "^1.14.1",
|
||||
"unplugin-vue-router": "^0.10.8",
|
||||
@ -125,14 +125,14 @@
|
||||
"vue-router": "^4.4.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nuxt/scripts": "0.9.4",
|
||||
"@nuxt/scripts": "0.9.5",
|
||||
"@nuxt/ui-templates": "1.3.4",
|
||||
"@parcel/watcher": "2.4.1",
|
||||
"@types/estree": "1.0.6",
|
||||
"@vitejs/plugin-vue": "5.1.4",
|
||||
"@vue/compiler-sfc": "3.5.12",
|
||||
"unbuild": "latest",
|
||||
"vite": "5.4.8",
|
||||
"vite": "5.4.9",
|
||||
"vitest": "2.1.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
@ -31,7 +31,7 @@
|
||||
"dependencies": {
|
||||
"@nuxt/friendly-errors-webpack-plugin": "^2.6.0",
|
||||
"@nuxt/kit": "workspace:*",
|
||||
"@rspack/core": "^1.0.10",
|
||||
"@rspack/core": "^1.0.13",
|
||||
"autoprefixer": "^10.4.20",
|
||||
"css-loader": "^7.1.2",
|
||||
"css-minimizer-webpack-plugin": "^7.0.0",
|
||||
|
@ -39,7 +39,7 @@
|
||||
"@types/file-loader": "5.0.4",
|
||||
"@types/pug": "2.0.10",
|
||||
"@types/sass-loader": "8.0.9",
|
||||
"@unhead/schema": "1.11.7",
|
||||
"@unhead/schema": "1.11.10",
|
||||
"@vitejs/plugin-vue": "5.1.4",
|
||||
"@vitejs/plugin-vue-jsx": "4.0.1",
|
||||
"@vue/compiler-core": "3.5.12",
|
||||
@ -53,7 +53,7 @@
|
||||
"unbuild": "latest",
|
||||
"unctx": "2.3.1",
|
||||
"unenv": "1.10.0",
|
||||
"vite": "5.4.8",
|
||||
"vite": "5.4.9",
|
||||
"vue": "3.5.12",
|
||||
"vue-bundle-renderer": "2.1.1",
|
||||
"vue-loader": "17.4.2",
|
||||
|
@ -29,9 +29,9 @@
|
||||
"pathe": "1.1.2",
|
||||
"prettier": "3.3.3",
|
||||
"scule": "1.3.0",
|
||||
"tinyexec": "0.3.0",
|
||||
"tinyexec": "0.3.1",
|
||||
"tinyglobby": "0.2.9",
|
||||
"unocss": "0.63.4",
|
||||
"vite": "5.4.8"
|
||||
"vite": "5.4.9"
|
||||
}
|
||||
}
|
||||
|
@ -62,7 +62,7 @@
|
||||
"ufo": "^1.5.4",
|
||||
"unenv": "^1.10.0",
|
||||
"unplugin": "^1.14.1",
|
||||
"vite": "^5.4.8",
|
||||
"vite": "^5.4.9",
|
||||
"vite-node": "^2.1.2",
|
||||
"vite-plugin-checker": "^0.8.0",
|
||||
"vue-bundle-renderer": "^2.1.1"
|
||||
|
@ -74,7 +74,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nuxt/schema": "workspace:*",
|
||||
"@rspack/core": "1.0.10",
|
||||
"@rspack/core": "1.0.13",
|
||||
"@types/hash-sum": "1.0.2",
|
||||
"@types/lodash-es": "4.17.12",
|
||||
"@types/pify": "5.0.4",
|
||||
|
@ -1,4 +1,4 @@
|
||||
export default defineNuxtConfig({
|
||||
compatibilityDate: '2024-06-28',
|
||||
devtools: { enabled: true },
|
||||
compatibilityDate: '2024-06-28',
|
||||
})
|
||||
|
1009
pnpm-lock.yaml
1009
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
@ -80,7 +80,7 @@ describe.skipIf(process.env.SKIP_BUNDLE_SIZE === 'true' || process.env.ECOSYSTEM
|
||||
expect.soft(roundToKilobytes(serverStats.totalBytes)).toMatchInlineSnapshot(`"562k"`)
|
||||
|
||||
const modules = await analyzeSizes(['node_modules/**/*'], serverDir)
|
||||
expect.soft(roundToKilobytes(modules.totalBytes)).toMatchInlineSnapshot(`"89.7k"`)
|
||||
expect.soft(roundToKilobytes(modules.totalBytes)).toMatchInlineSnapshot(`"90.2k"`)
|
||||
|
||||
const packages = modules.files
|
||||
.filter(m => m.endsWith('package.json'))
|
||||
|
104
test/fixtures/basic-types/nuxt.config.ts
vendored
104
test/fixtures/basic-types/nuxt.config.ts
vendored
@ -1,61 +1,10 @@
|
||||
import { addTypeTemplate, installModule } from 'nuxt/kit'
|
||||
|
||||
export default defineNuxtConfig({
|
||||
compatibilityDate: '2024-06-28',
|
||||
experimental: {
|
||||
typedPages: true,
|
||||
appManifest: true,
|
||||
},
|
||||
future: {
|
||||
typescriptBundlerResolution: process.env.MODULE_RESOLUTION === 'bundler',
|
||||
compatibilityVersion: process.env.TEST_V4 === 'true' ? 4 : 3,
|
||||
},
|
||||
buildDir: process.env.NITRO_BUILD_DIR,
|
||||
builder: process.env.TEST_BUILDER as 'webpack' | 'rspack' | 'vite' ?? 'vite',
|
||||
theme: './extends/bar',
|
||||
extends: [
|
||||
'./extends/node_modules/foo',
|
||||
],
|
||||
app: {
|
||||
head: {
|
||||
// @ts-expect-error Promises are not allowed
|
||||
title: Promise.resolve('Nuxt Fixture'),
|
||||
// @ts-expect-error Functions are not allowed
|
||||
titleTemplate: title => 'test',
|
||||
meta: [
|
||||
{
|
||||
// Allows unknown property
|
||||
property: 'og:thing',
|
||||
content: '1234567890',
|
||||
},
|
||||
],
|
||||
},
|
||||
pageTransition: {
|
||||
// @ts-expect-error Functions are not allowed
|
||||
onBeforeEnter: el => console.log(el),
|
||||
},
|
||||
},
|
||||
runtimeConfig: {
|
||||
baseURL: '',
|
||||
baseAPIToken: '',
|
||||
privateConfig: 'secret_key',
|
||||
public: {
|
||||
ids: [1, 2, 3],
|
||||
needsFallback: undefined,
|
||||
testConfig: 123,
|
||||
},
|
||||
},
|
||||
appConfig: {
|
||||
fromNuxtConfig: true,
|
||||
nested: {
|
||||
val: 1,
|
||||
},
|
||||
},
|
||||
routeRules: {
|
||||
'/param': {
|
||||
redirect: '/param/1',
|
||||
},
|
||||
},
|
||||
theme: './extends/bar',
|
||||
modules: [
|
||||
function () {
|
||||
addTypeTemplate({
|
||||
@ -92,6 +41,57 @@ export default defineNuxtConfig({
|
||||
})
|
||||
},
|
||||
],
|
||||
app: {
|
||||
head: {
|
||||
// @ts-expect-error Promises are not allowed
|
||||
title: Promise.resolve('Nuxt Fixture'),
|
||||
// @ts-expect-error Functions are not allowed
|
||||
titleTemplate: title => 'test',
|
||||
meta: [
|
||||
{
|
||||
// Allows unknown property
|
||||
property: 'og:thing',
|
||||
content: '1234567890',
|
||||
},
|
||||
],
|
||||
},
|
||||
pageTransition: {
|
||||
// @ts-expect-error Functions are not allowed
|
||||
onBeforeEnter: el => console.log(el),
|
||||
},
|
||||
},
|
||||
appConfig: {
|
||||
fromNuxtConfig: true,
|
||||
nested: {
|
||||
val: 1,
|
||||
},
|
||||
},
|
||||
runtimeConfig: {
|
||||
baseURL: '',
|
||||
baseAPIToken: '',
|
||||
privateConfig: 'secret_key',
|
||||
public: {
|
||||
ids: [1, 2, 3],
|
||||
needsFallback: undefined,
|
||||
testConfig: 123,
|
||||
},
|
||||
},
|
||||
buildDir: process.env.NITRO_BUILD_DIR,
|
||||
builder: process.env.TEST_BUILDER as 'webpack' | 'rspack' | 'vite' ?? 'vite',
|
||||
routeRules: {
|
||||
'/param': {
|
||||
redirect: '/param/1',
|
||||
},
|
||||
},
|
||||
future: {
|
||||
typescriptBundlerResolution: process.env.MODULE_RESOLUTION === 'bundler',
|
||||
compatibilityVersion: process.env.TEST_V4 === 'true' ? 4 : 3,
|
||||
},
|
||||
experimental: {
|
||||
typedPages: true,
|
||||
appManifest: true,
|
||||
},
|
||||
compatibilityDate: '2024-06-28',
|
||||
telemetry: false, // for testing telemetry types - it is auto-disabled in tests
|
||||
hooks: {
|
||||
'schema:extend' (schemas) {
|
||||
|
232
test/fixtures/basic/nuxt.config.ts
vendored
232
test/fixtures/basic/nuxt.config.ts
vendored
@ -12,93 +12,12 @@ declare module 'nitropack' {
|
||||
}
|
||||
|
||||
export default defineNuxtConfig({
|
||||
future: { compatibilityVersion: process.env.TEST_V4 === 'true' ? 4 : 3 },
|
||||
compatibilityDate: '2024-06-28',
|
||||
app: {
|
||||
pageTransition: true,
|
||||
layoutTransition: true,
|
||||
teleportId: 'nuxt-teleport',
|
||||
teleportTag: 'span',
|
||||
head: {
|
||||
charset: 'utf-8',
|
||||
link: [undefined],
|
||||
meta: [
|
||||
{ name: 'viewport', content: 'width=1024, initial-scale=1' },
|
||||
{ charset: 'utf-8' },
|
||||
{ name: 'description', content: 'Nuxt Fixture' },
|
||||
],
|
||||
},
|
||||
keepalive: {
|
||||
include: ['keepalive-in-config', 'not-keepalive-in-nuxtpage'],
|
||||
},
|
||||
},
|
||||
buildDir: process.env.NITRO_BUILD_DIR,
|
||||
builder: process.env.TEST_BUILDER as 'webpack' | 'rspack' | 'vite' ?? 'vite',
|
||||
appId: 'nuxt-app-basic',
|
||||
build: {
|
||||
transpile: [
|
||||
(ctx) => {
|
||||
if (typeof ctx.isDev !== 'boolean') { throw new TypeError('context not passed') }
|
||||
return false
|
||||
},
|
||||
],
|
||||
},
|
||||
css: ['~/assets/global.css'],
|
||||
// this produces an order of `~` > `~/extends/bar` > `~/extends/node_modules/foo`
|
||||
theme: './extends/bar',
|
||||
extends: [
|
||||
'./extends/node_modules/foo',
|
||||
],
|
||||
nitro: {
|
||||
publicAssets: [
|
||||
{
|
||||
dir: '../custom-public',
|
||||
baseURL: '/custom',
|
||||
},
|
||||
],
|
||||
esbuild: {
|
||||
options: {
|
||||
// in order to test bigint serialization
|
||||
target: 'es2022',
|
||||
},
|
||||
},
|
||||
routeRules: {
|
||||
'/route-rules/spa': { ssr: false },
|
||||
'/redirect/catchall': { ssr: false },
|
||||
'/route-rules/middleware': { appMiddleware: 'route-rules-middleware' },
|
||||
'/hydration/spa-redirection/**': { ssr: false },
|
||||
'/no-scripts': { experimentalNoScripts: true },
|
||||
'/prerender/**': { prerender: true },
|
||||
},
|
||||
output: { dir: process.env.NITRO_OUTPUT_DIR },
|
||||
prerender: {
|
||||
routes: [
|
||||
'/random/a',
|
||||
'/random/b',
|
||||
'/random/c',
|
||||
'/prefetch/server-components',
|
||||
],
|
||||
},
|
||||
},
|
||||
postcss: {
|
||||
plugins: {
|
||||
'~/postcss/plugin': {},
|
||||
},
|
||||
},
|
||||
optimization: {
|
||||
keyedComposables: [
|
||||
{
|
||||
name: 'useCustomKeyedComposable',
|
||||
source: '~/other-composables-folder/custom-keyed-composable',
|
||||
argumentLength: 1,
|
||||
},
|
||||
],
|
||||
},
|
||||
runtimeConfig: {
|
||||
public: {
|
||||
needsFallback: undefined,
|
||||
},
|
||||
},
|
||||
// this produces an order of `~` > `~/extends/bar` > `~/extends/node_modules/foo`
|
||||
theme: './extends/bar',
|
||||
modules: [
|
||||
function (_options, nuxt) {
|
||||
// ensure setting `runtimeConfig` also sets `nitro.runtimeConfig`
|
||||
@ -181,12 +100,126 @@ export default defineNuxtConfig({
|
||||
// To test falsy module values
|
||||
undefined,
|
||||
],
|
||||
app: {
|
||||
pageTransition: true,
|
||||
layoutTransition: true,
|
||||
teleportId: 'nuxt-teleport',
|
||||
teleportTag: 'span',
|
||||
head: {
|
||||
charset: 'utf-8',
|
||||
link: [undefined],
|
||||
meta: [
|
||||
{ name: 'viewport', content: 'width=1024, initial-scale=1' },
|
||||
{ charset: 'utf-8' },
|
||||
{ name: 'description', content: 'Nuxt Fixture' },
|
||||
],
|
||||
},
|
||||
keepalive: {
|
||||
include: ['keepalive-in-config', 'not-keepalive-in-nuxtpage'],
|
||||
},
|
||||
},
|
||||
css: ['~/assets/global.css'],
|
||||
vue: {
|
||||
compilerOptions: {
|
||||
isCustomElement: (tag) => {
|
||||
return tag === 'custom-component'
|
||||
},
|
||||
},
|
||||
},
|
||||
appConfig: {
|
||||
fromNuxtConfig: true,
|
||||
nested: {
|
||||
val: 1,
|
||||
},
|
||||
},
|
||||
runtimeConfig: {
|
||||
public: {
|
||||
needsFallback: undefined,
|
||||
},
|
||||
},
|
||||
buildDir: process.env.NITRO_BUILD_DIR,
|
||||
builder: process.env.TEST_BUILDER as 'webpack' | 'rspack' | 'vite' ?? 'vite',
|
||||
build: {
|
||||
transpile: [
|
||||
(ctx) => {
|
||||
if (typeof ctx.isDev !== 'boolean') { throw new TypeError('context not passed') }
|
||||
return false
|
||||
},
|
||||
],
|
||||
},
|
||||
optimization: {
|
||||
keyedComposables: [
|
||||
{
|
||||
name: 'useCustomKeyedComposable',
|
||||
source: '~/other-composables-folder/custom-keyed-composable',
|
||||
argumentLength: 1,
|
||||
},
|
||||
],
|
||||
},
|
||||
future: { compatibilityVersion: process.env.TEST_V4 === 'true' ? 4 : 3 },
|
||||
features: {
|
||||
inlineStyles: id => !!id && !id.includes('assets.vue'),
|
||||
},
|
||||
experimental: {
|
||||
typedPages: true,
|
||||
polyfillVueUseHead: true,
|
||||
respectNoSSRHeader: true,
|
||||
clientFallback: true,
|
||||
restoreState: true,
|
||||
clientNodeCompat: true,
|
||||
componentIslands: {
|
||||
selectiveClient: 'deep',
|
||||
},
|
||||
treeshakeClientOnly: true,
|
||||
asyncContext: process.env.TEST_CONTEXT === 'async',
|
||||
appManifest: process.env.TEST_MANIFEST !== 'manifest-off',
|
||||
renderJsonPayloads: process.env.TEST_PAYLOAD !== 'js',
|
||||
headNext: true,
|
||||
inlineRouteRules: true,
|
||||
},
|
||||
compatibilityDate: '2024-06-28',
|
||||
nitro: {
|
||||
publicAssets: [
|
||||
{
|
||||
dir: '../custom-public',
|
||||
baseURL: '/custom',
|
||||
},
|
||||
],
|
||||
esbuild: {
|
||||
options: {
|
||||
// in order to test bigint serialization
|
||||
target: 'es2022',
|
||||
},
|
||||
},
|
||||
routeRules: {
|
||||
'/route-rules/spa': { ssr: false },
|
||||
'/redirect/catchall': { ssr: false },
|
||||
'/route-rules/middleware': { appMiddleware: 'route-rules-middleware' },
|
||||
'/hydration/spa-redirection/**': { ssr: false },
|
||||
'/no-scripts': { experimentalNoScripts: true },
|
||||
'/prerender/**': { prerender: true },
|
||||
},
|
||||
output: { dir: process.env.NITRO_OUTPUT_DIR },
|
||||
prerender: {
|
||||
routes: [
|
||||
'/random/a',
|
||||
'/random/b',
|
||||
'/random/c',
|
||||
'/prefetch/server-components',
|
||||
],
|
||||
},
|
||||
},
|
||||
vite: {
|
||||
logLevel: 'silent',
|
||||
build: {
|
||||
assetsInlineLimit: 100, // keep SVG as assets URL
|
||||
},
|
||||
},
|
||||
postcss: {
|
||||
plugins: {
|
||||
'~/postcss/plugin': {},
|
||||
},
|
||||
},
|
||||
telemetry: false, // for testing telemetry types - it is auto-disabled in tests
|
||||
hooks: {
|
||||
'webpack:config' (configs) {
|
||||
@ -239,37 +272,4 @@ export default defineNuxtConfig({
|
||||
})
|
||||
},
|
||||
},
|
||||
vue: {
|
||||
compilerOptions: {
|
||||
isCustomElement: (tag) => {
|
||||
return tag === 'custom-component'
|
||||
},
|
||||
},
|
||||
},
|
||||
features: {
|
||||
inlineStyles: id => !!id && !id.includes('assets.vue'),
|
||||
},
|
||||
experimental: {
|
||||
typedPages: true,
|
||||
polyfillVueUseHead: true,
|
||||
respectNoSSRHeader: true,
|
||||
clientFallback: true,
|
||||
restoreState: true,
|
||||
clientNodeCompat: true,
|
||||
componentIslands: {
|
||||
selectiveClient: 'deep',
|
||||
},
|
||||
treeshakeClientOnly: true,
|
||||
asyncContext: process.env.TEST_CONTEXT === 'async',
|
||||
appManifest: process.env.TEST_MANIFEST !== 'manifest-off',
|
||||
renderJsonPayloads: process.env.TEST_PAYLOAD !== 'js',
|
||||
headNext: true,
|
||||
inlineRouteRules: true,
|
||||
},
|
||||
appConfig: {
|
||||
fromNuxtConfig: true,
|
||||
nested: {
|
||||
val: 1,
|
||||
},
|
||||
},
|
||||
})
|
||||
|
2
test/fixtures/minimal-types/nuxt.config.ts
vendored
2
test/fixtures/minimal-types/nuxt.config.ts
vendored
@ -1,5 +1,5 @@
|
||||
export default defineNuxtConfig({
|
||||
future: { compatibilityVersion: process.env.TEST_V4 === 'true' ? 4 : 3 },
|
||||
compatibilityDate: '2024-06-28',
|
||||
experimental: { appManifest: true },
|
||||
compatibilityDate: '2024-06-28',
|
||||
})
|
||||
|
20
test/fixtures/minimal/nuxt.config.ts
vendored
20
test/fixtures/minimal/nuxt.config.ts
vendored
@ -7,15 +7,6 @@ const nuxtEntry = fileURLToPath(new URL('../../../packages/nuxt/dist/index.mjs',
|
||||
const isStubbed = readFileSync(nuxtEntry, 'utf-8').includes('const _module = jiti')
|
||||
|
||||
export default defineNuxtConfig({
|
||||
future: { compatibilityVersion: process.env.TEST_V4 === 'true' ? 4 : 3 },
|
||||
compatibilityDate: '2024-06-28',
|
||||
typescript: {
|
||||
typeCheck: isStubbed ? false : 'build',
|
||||
},
|
||||
pages: false,
|
||||
experimental: {
|
||||
externalVue: !testWithInlineVue,
|
||||
},
|
||||
$production: {
|
||||
vite: {
|
||||
$client: {
|
||||
@ -30,9 +21,18 @@ export default defineNuxtConfig({
|
||||
},
|
||||
},
|
||||
},
|
||||
pages: false,
|
||||
buildDir: testWithInlineVue ? '.nuxt-inline' : '.nuxt',
|
||||
sourcemap: false,
|
||||
future: { compatibilityVersion: process.env.TEST_V4 === 'true' ? 4 : 3 },
|
||||
experimental: {
|
||||
externalVue: !testWithInlineVue,
|
||||
},
|
||||
compatibilityDate: '2024-06-28',
|
||||
nitro: {
|
||||
output: { dir: fileURLToPath(new URL(testWithInlineVue ? './.output-inline' : './.output', import.meta.url)) },
|
||||
},
|
||||
sourcemap: false,
|
||||
typescript: {
|
||||
typeCheck: isStubbed ? false : 'build',
|
||||
},
|
||||
})
|
||||
|
10
test/fixtures/runtime-compiler/nuxt.config.ts
vendored
10
test/fixtures/runtime-compiler/nuxt.config.ts
vendored
@ -1,12 +1,12 @@
|
||||
// https://nuxt.com/docs/api/nuxt-config
|
||||
export default defineNuxtConfig({
|
||||
future: { compatibilityVersion: process.env.TEST_V4 === 'true' ? 4 : 3 },
|
||||
compatibilityDate: '2024-06-28',
|
||||
experimental: {
|
||||
externalVue: false,
|
||||
},
|
||||
vue: {
|
||||
runtimeCompiler: true,
|
||||
},
|
||||
builder: process.env.TEST_BUILDER as 'webpack' | 'rspack' | 'vite' ?? 'vite',
|
||||
future: { compatibilityVersion: process.env.TEST_V4 === 'true' ? 4 : 3 },
|
||||
experimental: {
|
||||
externalVue: false,
|
||||
},
|
||||
compatibilityDate: '2024-06-28',
|
||||
})
|
||||
|
6
test/fixtures/suspense/nuxt.config.ts
vendored
6
test/fixtures/suspense/nuxt.config.ts
vendored
@ -3,14 +3,14 @@ import { fileURLToPath } from 'node:url'
|
||||
const testWithInlineVue = process.env.EXTERNAL_VUE === 'false'
|
||||
|
||||
export default defineNuxtConfig({
|
||||
buildDir: testWithInlineVue ? '.nuxt-inline' : '.nuxt',
|
||||
sourcemap: false,
|
||||
future: { compatibilityVersion: process.env.TEST_V4 === 'true' ? 4 : 3 },
|
||||
compatibilityDate: '2024-06-28',
|
||||
experimental: {
|
||||
externalVue: !testWithInlineVue,
|
||||
},
|
||||
buildDir: testWithInlineVue ? '.nuxt-inline' : '.nuxt',
|
||||
compatibilityDate: '2024-06-28',
|
||||
nitro: {
|
||||
output: { dir: fileURLToPath(new URL(testWithInlineVue ? './.output-inline' : './.output', import.meta.url)) },
|
||||
},
|
||||
sourcemap: false,
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user