mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-29 09:02:03 +00:00
Merge remote-tracking branch 'origin/3.x' into test/3.x-vfs
This commit is contained in:
commit
fdd1fe95bc
@ -1,4 +1,4 @@
|
|||||||
FROM node:lts@sha256:48db4f6ea21d134be744207225753a1730c4bc1b4cdf836d44511c36bf0e34d7
|
FROM node:lts@sha256:fffa89e023a3351904c04284029105d9e2ac7020886d683775a298569591e5bb
|
||||||
|
|
||||||
RUN apt-get update && \
|
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 && \
|
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 && \
|
||||||
|
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
@ -75,7 +75,7 @@ jobs:
|
|||||||
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
|
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
|
||||||
|
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@461ef6c76dfe95d5c364de2f431ddbd31a417628 # v3.26.9
|
uses: github/codeql-action/init@e2b3eafc8d227b0241d48be5f425d47c2d750a13 # v3.26.10
|
||||||
with:
|
with:
|
||||||
config: |
|
config: |
|
||||||
paths:
|
paths:
|
||||||
@ -91,7 +91,7 @@ jobs:
|
|||||||
queries: +security-and-quality
|
queries: +security-and-quality
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@461ef6c76dfe95d5c364de2f431ddbd31a417628 # v3.26.9
|
uses: github/codeql-action/analyze@e2b3eafc8d227b0241d48be5f425d47c2d750a13 # v3.26.10
|
||||||
with:
|
with:
|
||||||
category: "/language:javascript-typescript"
|
category: "/language:javascript-typescript"
|
||||||
|
|
||||||
@ -244,7 +244,7 @@ jobs:
|
|||||||
TEST_PAYLOAD: ${{ matrix.payload }}
|
TEST_PAYLOAD: ${{ matrix.payload }}
|
||||||
SKIP_BUNDLE_SIZE: ${{ github.event_name != 'push' || matrix.env == 'dev' || matrix.builder == 'webpack' || matrix.context == 'default' || matrix.payload == 'js' || runner.os == 'Windows' }}
|
SKIP_BUNDLE_SIZE: ${{ github.event_name != 'push' || matrix.env == 'dev' || matrix.builder == 'webpack' || matrix.context == 'default' || matrix.payload == 'js' || runner.os == 'Windows' }}
|
||||||
|
|
||||||
- uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
|
- uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
|
||||||
if: github.event_name != 'push' && matrix.env == 'built' && matrix.builder == 'vite' && matrix.context == 'default' && matrix.os == 'ubuntu-latest' && matrix.manifest == 'manifest-on'
|
if: github.event_name != 'push' && matrix.env == 'built' && matrix.builder == 'vite' && matrix.context == 'default' && matrix.os == 'ubuntu-latest' && matrix.manifest == 'manifest-on'
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
2
.github/workflows/docs-check-links.yml
vendored
2
.github/workflows/docs-check-links.yml
vendored
@ -29,7 +29,7 @@ jobs:
|
|||||||
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
|
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
|
||||||
|
|
||||||
- name: Lychee link checker
|
- name: Lychee link checker
|
||||||
uses: lycheeverse/lychee-action@5047c2a4052946424ce139fe111135f6d7c0fe0b # for v1.8.0
|
uses: lycheeverse/lychee-action@897f08a07f689df1a43076f4374af272f66a6dd1 # for v1.8.0
|
||||||
with:
|
with:
|
||||||
# arguments with file types to check
|
# arguments with file types to check
|
||||||
args: >-
|
args: >-
|
||||||
|
2
.github/workflows/lint-workflows.yml
vendored
2
.github/workflows/lint-workflows.yml
vendored
@ -26,6 +26,6 @@ jobs:
|
|||||||
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
|
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
|
||||||
# From https://github.com/rhysd/actionlint/blob/main/docs/usage.md#use-actionlint-on-github-actions
|
# From https://github.com/rhysd/actionlint/blob/main/docs/usage.md#use-actionlint-on-github-actions
|
||||||
- name: Check workflow files
|
- name: Check workflow files
|
||||||
uses: docker://rhysd/actionlint:1.7.2@sha256:89d3f90f82781dee3c8724651129634b08cf2241bbd67fcd02a1c5198119fc5e
|
uses: docker://rhysd/actionlint:1.7.3@sha256:7617f05bd698cd2f1c3aedc05bc733ccec92cca0738f3e8722c32c5b42c70ae6
|
||||||
with:
|
with:
|
||||||
args: -color
|
args: -color
|
||||||
|
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.
|
# Upload the results to GitHub's code scanning dashboard.
|
||||||
- name: "Upload to code-scanning"
|
- name: "Upload to code-scanning"
|
||||||
uses: github/codeql-action/upload-sarif@461ef6c76dfe95d5c364de2f431ddbd31a417628 # v3.26.9
|
uses: github/codeql-action/upload-sarif@e2b3eafc8d227b0241d48be5f425d47c2d750a13 # v3.26.10
|
||||||
if: github.repository == 'nuxt/nuxt' && success()
|
if: github.repository == 'nuxt/nuxt' && success()
|
||||||
with:
|
with:
|
||||||
sarif_file: results.sarif
|
sarif_file: results.sarif
|
||||||
|
32
package.json
32
package.json
@ -39,20 +39,20 @@
|
|||||||
"@nuxt/ui-templates": "workspace:*",
|
"@nuxt/ui-templates": "workspace:*",
|
||||||
"@nuxt/vite-builder": "workspace:*",
|
"@nuxt/vite-builder": "workspace:*",
|
||||||
"@nuxt/webpack-builder": "workspace:*",
|
"@nuxt/webpack-builder": "workspace:*",
|
||||||
"@types/node": "20.16.9",
|
"@types/node": "20.16.10",
|
||||||
"@vue/compiler-core": "3.5.8",
|
"@vue/compiler-core": "3.5.10",
|
||||||
"@vue/compiler-dom": "3.5.8",
|
"@vue/compiler-dom": "3.5.10",
|
||||||
"@vue/shared": "3.5.8",
|
"@vue/shared": "3.5.10",
|
||||||
"magic-string": "^0.30.11",
|
"magic-string": "^0.30.11",
|
||||||
"nuxt": "workspace:*",
|
"nuxt": "workspace:*",
|
||||||
"ohash": "1.1.4",
|
"ohash": "1.1.4",
|
||||||
"postcss": "8.4.47",
|
"postcss": "8.4.47",
|
||||||
"rollup": "4.22.4",
|
"rollup": "4.24.0",
|
||||||
"send": ">=0.19.0",
|
"send": ">=0.19.0",
|
||||||
"typescript": "5.6.2",
|
"typescript": "5.6.2",
|
||||||
"ufo": "1.5.4",
|
"ufo": "1.5.4",
|
||||||
"vite": "5.4.8",
|
"vite": "5.4.8",
|
||||||
"vue": "3.5.8"
|
"vue": "3.5.10"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@eslint/js": "9.11.1",
|
"@eslint/js": "9.11.1",
|
||||||
@ -62,12 +62,12 @@
|
|||||||
"@nuxt/webpack-builder": "workspace:*",
|
"@nuxt/webpack-builder": "workspace:*",
|
||||||
"@testing-library/vue": "8.1.0",
|
"@testing-library/vue": "8.1.0",
|
||||||
"@types/eslint__js": "8.42.3",
|
"@types/eslint__js": "8.42.3",
|
||||||
"@types/node": "20.16.9",
|
"@types/node": "20.16.10",
|
||||||
"@types/semver": "7.5.8",
|
"@types/semver": "7.5.8",
|
||||||
"@unhead/schema": "1.11.6",
|
"@unhead/schema": "1.11.7",
|
||||||
"@unhead/vue": "1.11.6",
|
"@unhead/vue": "1.11.7",
|
||||||
"@vitejs/plugin-vue": "5.1.4",
|
"@vitejs/plugin-vue": "5.1.4",
|
||||||
"@vitest/coverage-v8": "2.1.1",
|
"@vitest/coverage-v8": "2.1.2",
|
||||||
"@vue/test-utils": "2.4.6",
|
"@vue/test-utils": "2.4.6",
|
||||||
"autoprefixer": "10.4.20",
|
"autoprefixer": "10.4.20",
|
||||||
"case-police": "0.7.0",
|
"case-police": "0.7.0",
|
||||||
@ -78,11 +78,11 @@
|
|||||||
"devalue": "5.1.1",
|
"devalue": "5.1.1",
|
||||||
"eslint": "9.11.1",
|
"eslint": "9.11.1",
|
||||||
"eslint-plugin-no-only-tests": "3.3.0",
|
"eslint-plugin-no-only-tests": "3.3.0",
|
||||||
"eslint-plugin-perfectionist": "3.7.0",
|
"eslint-plugin-perfectionist": "3.8.0",
|
||||||
"eslint-typegen": "0.3.2",
|
"eslint-typegen": "0.3.2",
|
||||||
"h3": "1.12.0",
|
"h3": "1.12.0",
|
||||||
"happy-dom": "15.7.4",
|
"happy-dom": "15.7.4",
|
||||||
"jiti": "2.0.0",
|
"jiti": "2.3.1",
|
||||||
"markdownlint-cli": "0.42.0",
|
"markdownlint-cli": "0.42.0",
|
||||||
"nitropack": "2.9.7",
|
"nitropack": "2.9.7",
|
||||||
"nuxi": "3.14.0",
|
"nuxi": "3.14.0",
|
||||||
@ -96,16 +96,16 @@
|
|||||||
"sherif": "1.0.0",
|
"sherif": "1.0.0",
|
||||||
"std-env": "3.7.0",
|
"std-env": "3.7.0",
|
||||||
"tinyexec": "0.3.0",
|
"tinyexec": "0.3.0",
|
||||||
"tinyglobby": "0.2.6",
|
"tinyglobby": "0.2.9",
|
||||||
"typescript": "5.6.2",
|
"typescript": "5.6.2",
|
||||||
"ufo": "1.5.4",
|
"ufo": "1.5.4",
|
||||||
"vitest": "2.1.1",
|
"vitest": "2.1.2",
|
||||||
"vitest-environment-nuxt": "1.0.1",
|
"vitest-environment-nuxt": "1.0.1",
|
||||||
"vue": "3.5.8",
|
"vue": "3.5.10",
|
||||||
"vue-router": "4.4.5",
|
"vue-router": "4.4.5",
|
||||||
"vue-tsc": "2.1.6"
|
"vue-tsc": "2.1.6"
|
||||||
},
|
},
|
||||||
"packageManager": "pnpm@9.11.0",
|
"packageManager": "pnpm@9.12.0",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^16.10.0 || >=18.0.0"
|
"node": "^16.10.0 || >=18.0.0"
|
||||||
},
|
},
|
||||||
|
@ -27,14 +27,14 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@nuxt/schema": "workspace:*",
|
"@nuxt/schema": "workspace:*",
|
||||||
"c12": "^1.11.2",
|
"c12": "^2.0.1",
|
||||||
"consola": "^3.2.3",
|
"consola": "^3.2.3",
|
||||||
"defu": "^6.1.4",
|
"defu": "^6.1.4",
|
||||||
"destr": "^2.0.3",
|
"destr": "^2.0.3",
|
||||||
"globby": "^14.0.2",
|
"globby": "^14.0.2",
|
||||||
"hash-sum": "^2.0.0",
|
"hash-sum": "^2.0.0",
|
||||||
"ignore": "^6.0.2",
|
"ignore": "^6.0.2",
|
||||||
"jiti": "^2.0.0",
|
"jiti": "^2.3.1",
|
||||||
"klona": "^2.0.6",
|
"klona": "^2.0.6",
|
||||||
"knitwork": "^1.1.0",
|
"knitwork": "^1.1.0",
|
||||||
"mlly": "^1.7.1",
|
"mlly": "^1.7.1",
|
||||||
@ -44,8 +44,8 @@
|
|||||||
"semver": "^7.6.3",
|
"semver": "^7.6.3",
|
||||||
"ufo": "^1.5.4",
|
"ufo": "^1.5.4",
|
||||||
"unctx": "^2.3.1",
|
"unctx": "^2.3.1",
|
||||||
"unimport": "^3.12.0",
|
"unimport": "^3.13.1",
|
||||||
"untyped": "^1.4.2"
|
"untyped": "^1.5.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/hash-sum": "1.0.2",
|
"@types/hash-sum": "1.0.2",
|
||||||
@ -55,7 +55,7 @@
|
|||||||
"nitropack": "2.9.7",
|
"nitropack": "2.9.7",
|
||||||
"unbuild": "latest",
|
"unbuild": "latest",
|
||||||
"vite": "5.4.8",
|
"vite": "5.4.8",
|
||||||
"vitest": "2.1.1",
|
"vitest": "2.1.2",
|
||||||
"webpack": "5.95.0"
|
"webpack": "5.95.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
@ -78,10 +78,7 @@ export const normalizeModuleTranspilePath = (p: string) => {
|
|||||||
export async function loadNuxtModuleInstance (nuxtModule: string | NuxtModule, nuxt: Nuxt = useNuxt()) {
|
export async function loadNuxtModuleInstance (nuxtModule: string | NuxtModule, nuxt: Nuxt = useNuxt()) {
|
||||||
let buildTimeModuleMeta: ModuleMeta = {}
|
let buildTimeModuleMeta: ModuleMeta = {}
|
||||||
|
|
||||||
const jiti = createJiti(nuxt.options.rootDir, {
|
const jiti = createJiti(nuxt.options.rootDir, { alias: nuxt.options.alias })
|
||||||
interopDefault: true,
|
|
||||||
alias: nuxt.options.alias,
|
|
||||||
})
|
|
||||||
|
|
||||||
// Import if input is string
|
// Import if input is string
|
||||||
if (typeof nuxtModule === 'string') {
|
if (typeof nuxtModule === 'string') {
|
||||||
@ -91,7 +88,7 @@ export async function loadNuxtModuleInstance (nuxtModule: string | NuxtModule, n
|
|||||||
for (const path of paths) {
|
for (const path of paths) {
|
||||||
try {
|
try {
|
||||||
const src = jiti.esmResolve(path, { parentURL: parentURL.replace(/\/node_modules\/?$/, '') })
|
const src = jiti.esmResolve(path, { parentURL: parentURL.replace(/\/node_modules\/?$/, '') })
|
||||||
nuxtModule = await jiti.import(src) as NuxtModule
|
nuxtModule = await jiti.import(src, { default: true }) as NuxtModule
|
||||||
|
|
||||||
// nuxt-module-builder generates a module.json with metadata including the version
|
// nuxt-module-builder generates a module.json with metadata including the version
|
||||||
const moduleMetadataPath = join(dirname(src), 'module.json')
|
const moduleMetadataPath = join(dirname(src), 'module.json')
|
||||||
|
@ -60,18 +60,18 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@nuxt/devalue": "^2.0.2",
|
"@nuxt/devalue": "^2.0.2",
|
||||||
"@nuxt/devtools": "^1.5.1",
|
"@nuxt/devtools": "^1.5.2",
|
||||||
"@nuxt/kit": "workspace:*",
|
"@nuxt/kit": "workspace:*",
|
||||||
"@nuxt/schema": "workspace:*",
|
"@nuxt/schema": "workspace:*",
|
||||||
"@nuxt/telemetry": "^2.6.0",
|
"@nuxt/telemetry": "^2.6.0",
|
||||||
"@nuxt/vite-builder": "workspace:*",
|
"@nuxt/vite-builder": "workspace:*",
|
||||||
"@unhead/dom": "^1.11.6",
|
"@unhead/dom": "^1.11.7",
|
||||||
"@unhead/shared": "^1.11.6",
|
"@unhead/shared": "^1.11.7",
|
||||||
"@unhead/ssr": "^1.11.6",
|
"@unhead/ssr": "^1.11.7",
|
||||||
"@unhead/vue": "^1.11.6",
|
"@unhead/vue": "^1.11.7",
|
||||||
"@vue/shared": "^3.5.8",
|
"@vue/shared": "^3.5.10",
|
||||||
"acorn": "8.12.1",
|
"acorn": "8.12.1",
|
||||||
"c12": "^1.11.2",
|
"c12": "^2.0.1",
|
||||||
"chokidar": "^3.6.0",
|
"chokidar": "^3.6.0",
|
||||||
"compatx": "^0.1.8",
|
"compatx": "^0.1.8",
|
||||||
"consola": "^3.2.3",
|
"consola": "^3.2.3",
|
||||||
@ -88,7 +88,7 @@
|
|||||||
"hookable": "^5.5.3",
|
"hookable": "^5.5.3",
|
||||||
"ignore": "^6.0.2",
|
"ignore": "^6.0.2",
|
||||||
"impound": "^0.1.0",
|
"impound": "^0.1.0",
|
||||||
"jiti": "^2.0.0",
|
"jiti": "^2.3.1",
|
||||||
"klona": "^2.0.6",
|
"klona": "^2.0.6",
|
||||||
"knitwork": "^1.1.0",
|
"knitwork": "^1.1.0",
|
||||||
"magic-string": "^0.30.11",
|
"magic-string": "^0.30.11",
|
||||||
@ -107,33 +107,33 @@
|
|||||||
"semver": "^7.6.3",
|
"semver": "^7.6.3",
|
||||||
"std-env": "^3.7.0",
|
"std-env": "^3.7.0",
|
||||||
"strip-literal": "^2.1.0",
|
"strip-literal": "^2.1.0",
|
||||||
"tinyglobby": "0.2.6",
|
"tinyglobby": "0.2.9",
|
||||||
"ufo": "^1.5.4",
|
"ufo": "^1.5.4",
|
||||||
"ultrahtml": "^1.5.3",
|
"ultrahtml": "^1.5.3",
|
||||||
"uncrypto": "^0.1.3",
|
"uncrypto": "^0.1.3",
|
||||||
"unctx": "^2.3.1",
|
"unctx": "^2.3.1",
|
||||||
"unenv": "^1.10.0",
|
"unenv": "^1.10.0",
|
||||||
"unhead": "^1.11.6",
|
"unhead": "^1.11.7",
|
||||||
"unimport": "^3.12.0",
|
"unimport": "^3.13.1",
|
||||||
"unplugin": "^1.14.1",
|
"unplugin": "^1.14.1",
|
||||||
"unplugin-vue-router": "^0.10.8",
|
"unplugin-vue-router": "^0.10.8",
|
||||||
"unstorage": "^1.12.0",
|
"unstorage": "^1.12.0",
|
||||||
"untyped": "^1.4.2",
|
"untyped": "^1.5.1",
|
||||||
"vue": "^3.5.8",
|
"vue": "^3.5.10",
|
||||||
"vue-bundle-renderer": "^2.1.1",
|
"vue-bundle-renderer": "^2.1.1",
|
||||||
"vue-devtools-stub": "^0.1.0",
|
"vue-devtools-stub": "^0.1.0",
|
||||||
"vue-router": "^4.4.5"
|
"vue-router": "^4.4.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@nuxt/scripts": "0.9.3",
|
"@nuxt/scripts": "0.9.4",
|
||||||
"@nuxt/ui-templates": "1.3.4",
|
"@nuxt/ui-templates": "1.3.4",
|
||||||
"@parcel/watcher": "2.4.1",
|
"@parcel/watcher": "2.4.1",
|
||||||
"@types/estree": "1.0.6",
|
"@types/estree": "1.0.6",
|
||||||
"@vitejs/plugin-vue": "5.1.4",
|
"@vitejs/plugin-vue": "5.1.4",
|
||||||
"@vue/compiler-sfc": "3.5.8",
|
"@vue/compiler-sfc": "3.5.10",
|
||||||
"unbuild": "latest",
|
"unbuild": "latest",
|
||||||
"vite": "5.4.8",
|
"vite": "5.4.8",
|
||||||
"vitest": "2.1.1"
|
"vitest": "2.1.2"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@parcel/watcher": "^2.1.0",
|
"@parcel/watcher": "^2.1.0",
|
||||||
|
@ -26,7 +26,6 @@ export default defineNuxtModule({
|
|||||||
|
|
||||||
// Initialize untyped/jiti loader
|
// Initialize untyped/jiti loader
|
||||||
const _resolveSchema = createJiti(fileURLToPath(import.meta.url), {
|
const _resolveSchema = createJiti(fileURLToPath(import.meta.url), {
|
||||||
interopDefault: true,
|
|
||||||
cache: false,
|
cache: false,
|
||||||
transformOptions: {
|
transformOptions: {
|
||||||
babel: {
|
babel: {
|
||||||
@ -100,7 +99,7 @@ export default defineNuxtModule({
|
|||||||
let loadedConfig: SchemaDefinition
|
let loadedConfig: SchemaDefinition
|
||||||
try {
|
try {
|
||||||
// TODO: fix type for second argument of `import`
|
// TODO: fix type for second argument of `import`
|
||||||
loadedConfig = await _resolveSchema.import(filePath, {}) as SchemaDefinition
|
loadedConfig = await _resolveSchema.import(filePath, { default: true }) as SchemaDefinition
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
logger.warn(
|
logger.warn(
|
||||||
'Unable to load schema from',
|
'Unable to load schema from',
|
||||||
|
@ -39,13 +39,13 @@
|
|||||||
"@types/file-loader": "5.0.4",
|
"@types/file-loader": "5.0.4",
|
||||||
"@types/pug": "2.0.10",
|
"@types/pug": "2.0.10",
|
||||||
"@types/sass-loader": "8.0.9",
|
"@types/sass-loader": "8.0.9",
|
||||||
"@unhead/schema": "1.11.6",
|
"@unhead/schema": "1.11.7",
|
||||||
"@vitejs/plugin-vue": "5.1.4",
|
"@vitejs/plugin-vue": "5.1.4",
|
||||||
"@vitejs/plugin-vue-jsx": "4.0.1",
|
"@vitejs/plugin-vue-jsx": "4.0.1",
|
||||||
"@vue/compiler-core": "3.5.8",
|
"@vue/compiler-core": "3.5.10",
|
||||||
"@vue/compiler-sfc": "3.5.8",
|
"@vue/compiler-sfc": "3.5.10",
|
||||||
"@vue/language-core": "2.1.6",
|
"@vue/language-core": "2.1.6",
|
||||||
"c12": "1.11.2",
|
"c12": "2.0.1",
|
||||||
"esbuild-loader": "4.2.2",
|
"esbuild-loader": "4.2.2",
|
||||||
"h3": "1.12.0",
|
"h3": "1.12.0",
|
||||||
"ignore": "6.0.2",
|
"ignore": "6.0.2",
|
||||||
@ -55,7 +55,7 @@
|
|||||||
"unctx": "2.3.1",
|
"unctx": "2.3.1",
|
||||||
"unenv": "1.10.0",
|
"unenv": "1.10.0",
|
||||||
"vite": "5.4.8",
|
"vite": "5.4.8",
|
||||||
"vue": "3.5.8",
|
"vue": "3.5.10",
|
||||||
"vue-bundle-renderer": "2.1.1",
|
"vue-bundle-renderer": "2.1.1",
|
||||||
"vue-loader": "17.4.2",
|
"vue-loader": "17.4.2",
|
||||||
"vue-router": "4.4.5",
|
"vue-router": "4.4.5",
|
||||||
@ -73,8 +73,8 @@
|
|||||||
"std-env": "^3.7.0",
|
"std-env": "^3.7.0",
|
||||||
"ufo": "^1.5.4",
|
"ufo": "^1.5.4",
|
||||||
"uncrypto": "^0.1.3",
|
"uncrypto": "^0.1.3",
|
||||||
"unimport": "^3.12.0",
|
"unimport": "^3.13.1",
|
||||||
"untyped": "^1.4.2"
|
"untyped": "^1.5.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^14.18.0 || >=16.10.0"
|
"node": "^14.18.0 || >=16.10.0"
|
||||||
|
@ -19,19 +19,19 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/lodash-es": "4.17.12",
|
"@types/lodash-es": "4.17.12",
|
||||||
"@unocss/reset": "0.62.4",
|
"@unocss/reset": "0.63.2",
|
||||||
"critters": "0.0.24",
|
"critters": "0.0.24",
|
||||||
"html-validate": "8.24.0",
|
"html-validate": "8.24.0",
|
||||||
"htmlnano": "2.1.1",
|
"htmlnano": "2.1.1",
|
||||||
"jiti": "2.0.0",
|
"jiti": "2.3.1",
|
||||||
"knitwork": "1.1.0",
|
"knitwork": "1.1.0",
|
||||||
"lodash-es": "4.17.21",
|
"lodash-es": "4.17.21",
|
||||||
"pathe": "1.1.2",
|
"pathe": "1.1.2",
|
||||||
"prettier": "3.3.3",
|
"prettier": "3.3.3",
|
||||||
"scule": "1.3.0",
|
"scule": "1.3.0",
|
||||||
"tinyexec": "0.3.0",
|
"tinyexec": "0.3.0",
|
||||||
"tinyglobby": "0.2.6",
|
"tinyglobby": "0.2.9",
|
||||||
"unocss": "0.62.4",
|
"unocss": "0.63.2",
|
||||||
"vite": "5.4.8"
|
"vite": "5.4.8"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,9 +27,9 @@
|
|||||||
"@nuxt/schema": "workspace:*",
|
"@nuxt/schema": "workspace:*",
|
||||||
"@types/clear": "0.1.4",
|
"@types/clear": "0.1.4",
|
||||||
"@types/estree": "1.0.6",
|
"@types/estree": "1.0.6",
|
||||||
"rollup": "4.22.4",
|
"rollup": "4.24.0",
|
||||||
"unbuild": "latest",
|
"unbuild": "latest",
|
||||||
"vue": "3.5.8"
|
"vue": "3.5.10"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@nuxt/kit": "workspace:*",
|
"@nuxt/kit": "workspace:*",
|
||||||
@ -47,7 +47,7 @@
|
|||||||
"externality": "^1.0.2",
|
"externality": "^1.0.2",
|
||||||
"get-port-please": "^3.1.2",
|
"get-port-please": "^3.1.2",
|
||||||
"h3": "^1.12.0",
|
"h3": "^1.12.0",
|
||||||
"jiti": "^2.0.0",
|
"jiti": "^2.3.1",
|
||||||
"knitwork": "^1.1.0",
|
"knitwork": "^1.1.0",
|
||||||
"magic-string": "^0.30.11",
|
"magic-string": "^0.30.11",
|
||||||
"mlly": "^1.7.1",
|
"mlly": "^1.7.1",
|
||||||
@ -63,7 +63,7 @@
|
|||||||
"unenv": "^1.10.0",
|
"unenv": "^1.10.0",
|
||||||
"unplugin": "^1.14.1",
|
"unplugin": "^1.14.1",
|
||||||
"vite": "^5.4.8",
|
"vite": "^5.4.8",
|
||||||
"vite-node": "^2.1.1",
|
"vite-node": "^2.1.2",
|
||||||
"vite-plugin-checker": "^0.8.0",
|
"vite-plugin-checker": "^0.8.0",
|
||||||
"vue-bundle-renderer": "^2.1.1"
|
"vue-bundle-renderer": "^2.1.1"
|
||||||
},
|
},
|
||||||
|
@ -18,10 +18,7 @@ export async function resolveCSSOptions (nuxt: Nuxt): Promise<ViteConfig['css']>
|
|||||||
css.postcss.plugins = []
|
css.postcss.plugins = []
|
||||||
const postcssOptions = nuxt.options.postcss
|
const postcssOptions = nuxt.options.postcss
|
||||||
|
|
||||||
const jiti = createJiti(nuxt.options.rootDir, {
|
const jiti = createJiti(nuxt.options.rootDir, { alias: nuxt.options.alias })
|
||||||
interopDefault: true,
|
|
||||||
alias: nuxt.options.alias,
|
|
||||||
})
|
|
||||||
|
|
||||||
for (const pluginName of sortPlugins(postcssOptions)) {
|
for (const pluginName of sortPlugins(postcssOptions)) {
|
||||||
const pluginOptions = postcssOptions.plugins[pluginName]
|
const pluginOptions = postcssOptions.plugins[pluginName]
|
||||||
@ -29,7 +26,7 @@ export async function resolveCSSOptions (nuxt: Nuxt): Promise<ViteConfig['css']>
|
|||||||
|
|
||||||
let pluginFn: ((opts: Record<string, any>) => Plugin) | undefined
|
let pluginFn: ((opts: Record<string, any>) => Plugin) | undefined
|
||||||
for (const parentURL of nuxt.options.modulesDir) {
|
for (const parentURL of nuxt.options.modulesDir) {
|
||||||
pluginFn = await jiti.import(pluginName, { parentURL: parentURL.replace(/\/node_modules\/?$/, ''), try: true }) as (opts: Record<string, any>) => Plugin
|
pluginFn = await jiti.import(pluginName, { parentURL: parentURL.replace(/\/node_modules\/?$/, ''), try: true, default: true }) as (opts: Record<string, any>) => Plugin
|
||||||
if (typeof pluginFn === 'function') {
|
if (typeof pluginFn === 'function') {
|
||||||
css.postcss.plugins.push(pluginFn(pluginOptions))
|
css.postcss.plugins.push(pluginFn(pluginOptions))
|
||||||
break
|
break
|
||||||
|
@ -71,7 +71,9 @@ export function ssrStylesPlugin (options: SSRStylePluginOptions): Plugin {
|
|||||||
: outputOptions.assetFileNames({
|
: outputOptions.assetFileNames({
|
||||||
type: 'asset',
|
type: 'asset',
|
||||||
name: `${fileName}-styles.mjs`,
|
name: `${fileName}-styles.mjs`,
|
||||||
|
names: [`${fileName}-styles.mjs`],
|
||||||
originalFileName: `${fileName}-styles.mjs`,
|
originalFileName: `${fileName}-styles.mjs`,
|
||||||
|
originalFileNames: [`${fileName}-styles.mjs`],
|
||||||
source: '',
|
source: '',
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
"fork-ts-checker-webpack-plugin": "^9.0.2",
|
"fork-ts-checker-webpack-plugin": "^9.0.2",
|
||||||
"h3": "^1.12.0",
|
"h3": "^1.12.0",
|
||||||
"hash-sum": "^2.0.0",
|
"hash-sum": "^2.0.0",
|
||||||
"jiti": "^2.0.0",
|
"jiti": "^2.3.1",
|
||||||
"lodash-es": "4.17.21",
|
"lodash-es": "4.17.21",
|
||||||
"magic-string": "^0.30.11",
|
"magic-string": "^0.30.11",
|
||||||
"memfs": "^4.12.0",
|
"memfs": "^4.12.0",
|
||||||
@ -76,7 +76,7 @@
|
|||||||
"@types/webpack-bundle-analyzer": "4.7.0",
|
"@types/webpack-bundle-analyzer": "4.7.0",
|
||||||
"@types/webpack-hot-middleware": "2.25.9",
|
"@types/webpack-hot-middleware": "2.25.9",
|
||||||
"unbuild": "latest",
|
"unbuild": "latest",
|
||||||
"vue": "3.5.8"
|
"vue": "3.5.10"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"vue": "^3.3.4"
|
"vue": "^3.3.4"
|
||||||
|
@ -36,10 +36,7 @@ export async function getPostcssConfig (nuxt: Nuxt) {
|
|||||||
sourceMap: nuxt.options.webpack.cssSourceMap,
|
sourceMap: nuxt.options.webpack.cssSourceMap,
|
||||||
})
|
})
|
||||||
|
|
||||||
const jiti = createJiti(nuxt.options.rootDir, {
|
const jiti = createJiti(nuxt.options.rootDir, { alias: nuxt.options.alias })
|
||||||
interopDefault: true,
|
|
||||||
alias: nuxt.options.alias,
|
|
||||||
})
|
|
||||||
|
|
||||||
// Keep the order of default plugins
|
// Keep the order of default plugins
|
||||||
if (!Array.isArray(postcssOptions.plugins) && isPureObject(postcssOptions.plugins)) {
|
if (!Array.isArray(postcssOptions.plugins) && isPureObject(postcssOptions.plugins)) {
|
||||||
@ -51,7 +48,7 @@ export async function getPostcssConfig (nuxt: Nuxt) {
|
|||||||
|
|
||||||
let pluginFn: ((opts: Record<string, any>) => Plugin) | undefined
|
let pluginFn: ((opts: Record<string, any>) => Plugin) | undefined
|
||||||
for (const parentURL of nuxt.options.modulesDir) {
|
for (const parentURL of nuxt.options.modulesDir) {
|
||||||
pluginFn = await jiti.import(pluginName, { parentURL: parentURL.replace(/\/node_modules\/?$/, ''), try: true }) as (opts: Record<string, any>) => Plugin
|
pluginFn = await jiti.import(pluginName, { parentURL: parentURL.replace(/\/node_modules\/?$/, ''), try: true, default: true }) as (opts: Record<string, any>) => Plugin
|
||||||
if (typeof pluginFn === 'function') {
|
if (typeof pluginFn === 'function') {
|
||||||
plugins.push(pluginFn(pluginOptions))
|
plugins.push(pluginFn(pluginOptions))
|
||||||
break
|
break
|
||||||
|
2100
pnpm-lock.yaml
2100
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
@ -77,7 +77,7 @@ describe.skipIf(process.env.SKIP_BUNDLE_SIZE === 'true' || process.env.ECOSYSTEM
|
|||||||
const serverDir = join(rootDir, '.output-inline/server')
|
const serverDir = join(rootDir, '.output-inline/server')
|
||||||
|
|
||||||
const serverStats = await analyzeSizes(['**/*.mjs', '!node_modules'], serverDir)
|
const serverStats = await analyzeSizes(['**/*.mjs', '!node_modules'], serverDir)
|
||||||
expect.soft(roundToKilobytes(serverStats.totalBytes)).toMatchInlineSnapshot(`"562k"`)
|
expect.soft(roundToKilobytes(serverStats.totalBytes)).toMatchInlineSnapshot(`"563k"`)
|
||||||
|
|
||||||
const modules = await analyzeSizes(['node_modules/**/*'], serverDir)
|
const modules = await analyzeSizes(['node_modules/**/*'], serverDir)
|
||||||
expect.soft(roundToKilobytes(modules.totalBytes)).toMatchInlineSnapshot(`"89.7k"`)
|
expect.soft(roundToKilobytes(modules.totalBytes)).toMatchInlineSnapshot(`"89.7k"`)
|
||||||
|
Loading…
Reference in New Issue
Block a user