mirror of https://github.com/nuxt/nuxt.git
Compare commits
4 Commits
1115cccfb6
...
e63a3082cf
Author | SHA1 | Date |
---|---|---|
github-actions[bot] | e63a3082cf | |
renovate[bot] | fa3efbf918 | |
Daniel Roe | 9d77fdc802 | |
Daniel Roe | 3526ca2202 |
18
package.json
18
package.json
|
@ -39,9 +39,9 @@
|
|||
"@nuxt/ui-templates": "workspace:*",
|
||||
"@nuxt/vite-builder": "workspace:*",
|
||||
"@nuxt/webpack-builder": "workspace:*",
|
||||
"@vue/compiler-core": "3.5.6",
|
||||
"@vue/compiler-dom": "3.5.6",
|
||||
"@vue/shared": "3.5.6",
|
||||
"@vue/compiler-core": "3.5.7",
|
||||
"@vue/compiler-dom": "3.5.7",
|
||||
"@vue/shared": "3.5.7",
|
||||
"@types/node": "20.16.5",
|
||||
"magic-string": "^0.30.11",
|
||||
"nuxt": "workspace:*",
|
||||
|
@ -51,11 +51,11 @@
|
|||
"send": ">=0.19.0",
|
||||
"typescript": "5.6.2",
|
||||
"ufo": "1.5.4",
|
||||
"vite": "5.4.6",
|
||||
"vue": "3.5.6"
|
||||
"vite": "5.4.7",
|
||||
"vue": "3.5.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "9.10.0",
|
||||
"@eslint/js": "9.11.0",
|
||||
"@nuxt/eslint-config": "0.5.7",
|
||||
"@nuxt/kit": "workspace:*",
|
||||
"@nuxt/test-utils": "3.14.2",
|
||||
|
@ -76,7 +76,7 @@
|
|||
"cssnano": "7.0.6",
|
||||
"destr": "2.0.3",
|
||||
"devalue": "5.0.0",
|
||||
"eslint": "9.10.0",
|
||||
"eslint": "9.11.0",
|
||||
"eslint-plugin-no-only-tests": "3.3.0",
|
||||
"eslint-plugin-perfectionist": "3.6.0",
|
||||
"eslint-typegen": "0.3.2",
|
||||
|
@ -101,11 +101,11 @@
|
|||
"ufo": "1.5.4",
|
||||
"vitest": "2.1.1",
|
||||
"vitest-environment-nuxt": "1.0.1",
|
||||
"vue": "3.5.6",
|
||||
"vue": "3.5.7",
|
||||
"vue-router": "4.4.5",
|
||||
"vue-tsc": "2.1.6"
|
||||
},
|
||||
"packageManager": "pnpm@9.10.0",
|
||||
"packageManager": "pnpm@9.11.0",
|
||||
"engines": {
|
||||
"node": "^16.10.0 || >=18.0.0"
|
||||
},
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@nuxt/kit",
|
||||
"version": "3.13.2",
|
||||
"version": "3.14.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/nuxt/nuxt.git",
|
||||
|
@ -54,7 +54,7 @@
|
|||
"lodash-es": "4.17.21",
|
||||
"nitropack": "2.9.7",
|
||||
"unbuild": "latest",
|
||||
"vite": "5.4.6",
|
||||
"vite": "5.4.7",
|
||||
"vitest": "2.1.1",
|
||||
"webpack": "5.94.0"
|
||||
},
|
||||
|
|
|
@ -85,7 +85,6 @@ export async function loadNuxtModuleInstance (nuxtModule: string | NuxtModule, n
|
|||
|
||||
// Import if input is string
|
||||
if (typeof nuxtModule === 'string') {
|
||||
let error: unknown
|
||||
const paths = [join(nuxtModule, 'nuxt'), join(nuxtModule, 'module'), nuxtModule, join(nuxt.options.rootDir, nuxtModule)]
|
||||
|
||||
for (const parentURL of nuxt.options.modulesDir) {
|
||||
|
@ -100,16 +99,17 @@ export async function loadNuxtModuleInstance (nuxtModule: string | NuxtModule, n
|
|||
buildTimeModuleMeta = JSON.parse(await fsp.readFile(moduleMetadataPath, 'utf-8'))
|
||||
}
|
||||
break
|
||||
} catch (_err: unknown) {
|
||||
error = _err
|
||||
} catch (error: unknown) {
|
||||
const code = (error as Error & { code?: string }).code
|
||||
if (code === 'MODULE_NOT_FOUND' || code === 'ERR_PACKAGE_PATH_NOT_EXPORTED' || code === 'ERR_MODULE_NOT_FOUND' || code === 'ERR_UNSUPPORTED_DIR_IMPORT') {
|
||||
continue
|
||||
}
|
||||
logger.error(`Error while importing module \`${nuxtModule}\`: ${error}`)
|
||||
throw error
|
||||
}
|
||||
}
|
||||
if (typeof nuxtModule !== 'string') { break }
|
||||
}
|
||||
if (typeof nuxtModule !== 'function' && error) {
|
||||
logger.error(`Error while importing module \`${nuxtModule}\`: ${error}`)
|
||||
throw error
|
||||
}
|
||||
}
|
||||
|
||||
// Throw error if input is not a function
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "nuxt",
|
||||
"version": "3.13.2",
|
||||
"version": "3.14.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/nuxt/nuxt.git",
|
||||
|
@ -60,7 +60,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@nuxt/devalue": "^2.0.2",
|
||||
"@nuxt/devtools": "^1.4.2",
|
||||
"@nuxt/devtools": "^1.5.0",
|
||||
"@nuxt/kit": "workspace:*",
|
||||
"@nuxt/schema": "workspace:*",
|
||||
"@nuxt/telemetry": "^2.6.0",
|
||||
|
@ -69,7 +69,7 @@
|
|||
"@unhead/shared": "^1.11.6",
|
||||
"@unhead/ssr": "^1.11.6",
|
||||
"@unhead/vue": "^1.11.6",
|
||||
"@vue/shared": "^3.5.6",
|
||||
"@vue/shared": "^3.5.7",
|
||||
"acorn": "8.12.1",
|
||||
"c12": "^1.11.2",
|
||||
"chokidar": "^3.6.0",
|
||||
|
@ -119,7 +119,7 @@
|
|||
"unplugin-vue-router": "^0.10.8",
|
||||
"unstorage": "^1.12.0",
|
||||
"untyped": "^1.4.2",
|
||||
"vue": "^3.5.6",
|
||||
"vue": "^3.5.7",
|
||||
"vue-bundle-renderer": "^2.1.0",
|
||||
"vue-devtools-stub": "^0.1.0",
|
||||
"vue-router": "^4.4.5"
|
||||
|
@ -130,9 +130,9 @@
|
|||
"@parcel/watcher": "2.4.1",
|
||||
"@types/estree": "1.0.6",
|
||||
"@vitejs/plugin-vue": "5.1.4",
|
||||
"@vue/compiler-sfc": "3.5.6",
|
||||
"@vue/compiler-sfc": "3.5.7",
|
||||
"unbuild": "latest",
|
||||
"vite": "5.4.6",
|
||||
"vite": "5.4.7",
|
||||
"vitest": "2.1.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@nuxt/schema",
|
||||
"version": "3.13.2",
|
||||
"version": "3.14.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/nuxt/nuxt.git",
|
||||
|
@ -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.6",
|
||||
"@vue/compiler-sfc": "3.5.6",
|
||||
"@vue/compiler-core": "3.5.7",
|
||||
"@vue/compiler-sfc": "3.5.7",
|
||||
"@vue/language-core": "2.1.6",
|
||||
"c12": "1.11.2",
|
||||
"esbuild-loader": "4.2.2",
|
||||
|
@ -54,8 +54,8 @@
|
|||
"unbuild": "latest",
|
||||
"unctx": "2.3.1",
|
||||
"unenv": "1.10.0",
|
||||
"vite": "5.4.6",
|
||||
"vue": "3.5.6",
|
||||
"vite": "5.4.7",
|
||||
"vue": "3.5.7",
|
||||
"vue-bundle-renderer": "2.1.0",
|
||||
"vue-loader": "17.4.2",
|
||||
"vue-router": "4.4.5",
|
||||
|
|
|
@ -32,6 +32,6 @@
|
|||
"tinyexec": "0.3.0",
|
||||
"tinyglobby": "0.2.6",
|
||||
"unocss": "0.62.4",
|
||||
"vite": "5.4.6"
|
||||
"vite": "5.4.7"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@nuxt/vite-builder",
|
||||
"version": "3.13.2",
|
||||
"version": "3.14.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/nuxt/nuxt.git",
|
||||
|
@ -29,7 +29,7 @@
|
|||
"@types/estree": "1.0.6",
|
||||
"rollup": "4.22.2",
|
||||
"unbuild": "latest",
|
||||
"vue": "3.5.6"
|
||||
"vue": "3.5.7"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nuxt/kit": "workspace:*",
|
||||
|
@ -62,7 +62,7 @@
|
|||
"ufo": "^1.5.4",
|
||||
"unenv": "^1.10.0",
|
||||
"unplugin": "^1.14.1",
|
||||
"vite": "^5.4.6",
|
||||
"vite": "^5.4.7",
|
||||
"vite-node": "^2.1.1",
|
||||
"vite-plugin-checker": "^0.8.0",
|
||||
"vue-bundle-renderer": "^2.1.0"
|
||||
|
|
|
@ -27,11 +27,16 @@ export async function resolveCSSOptions (nuxt: Nuxt): Promise<ViteConfig['css']>
|
|||
const pluginOptions = postcssOptions.plugins[pluginName]
|
||||
if (!pluginOptions) { continue }
|
||||
|
||||
const path = jiti.esmResolve(pluginName)
|
||||
const pluginFn = (await jiti.import(path)) as (opts: Record<string, any>) => Plugin
|
||||
if (typeof pluginFn === 'function') {
|
||||
css.postcss.plugins.push(pluginFn(pluginOptions))
|
||||
} else {
|
||||
let pluginFn: ((opts: Record<string, any>) => Plugin) | undefined
|
||||
for (const parentURL of nuxt.options.modulesDir) {
|
||||
pluginFn = await jiti.import(pluginName, { parentURL, try: true }) as (opts: Record<string, any>) => Plugin
|
||||
if (typeof pluginFn === 'function') {
|
||||
css.postcss.plugins.push(pluginFn(pluginOptions))
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof pluginFn !== 'function') {
|
||||
console.warn(`[nuxt] could not import postcss plugin \`${pluginName}\`. Please report this as a bug.`)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@nuxt/webpack-builder",
|
||||
"version": "3.13.2",
|
||||
"version": "3.14.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/nuxt/nuxt.git",
|
||||
|
@ -77,7 +77,7 @@
|
|||
"@types/webpack-bundle-analyzer": "4.7.0",
|
||||
"@types/webpack-hot-middleware": "2.25.9",
|
||||
"unbuild": "latest",
|
||||
"vue": "3.5.6"
|
||||
"vue": "3.5.7"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"vue": "^3.3.4"
|
||||
|
|
|
@ -49,11 +49,16 @@ export async function getPostcssConfig (nuxt: Nuxt) {
|
|||
const pluginOptions = postcssOptions.plugins[pluginName]
|
||||
if (!pluginOptions) { continue }
|
||||
|
||||
const path = jiti.esmResolve(pluginName)
|
||||
const pluginFn = (await jiti.import(path)) as (opts: Record<string, any>) => Plugin
|
||||
if (typeof pluginFn === 'function') {
|
||||
plugins.push(pluginFn(pluginOptions))
|
||||
} else {
|
||||
let pluginFn: ((opts: Record<string, any>) => Plugin) | undefined
|
||||
for (const parentURL of nuxt.options.modulesDir) {
|
||||
pluginFn = await jiti.import(pluginName, { parentURL, try: true }) as (opts: Record<string, any>) => Plugin
|
||||
if (typeof pluginFn === 'function') {
|
||||
plugins.push(pluginFn(pluginOptions))
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof pluginFn !== 'function') {
|
||||
console.warn(`[nuxt] could not import postcss plugin \`${pluginName}\`. Please report this as a bug.`)
|
||||
}
|
||||
}
|
||||
|
|
741
pnpm-lock.yaml
741
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
|
@ -40,7 +40,7 @@ describe.skipIf(process.env.SKIP_BUNDLE_SIZE === 'true' || process.env.ECOSYSTEM
|
|||
expect.soft(roundToKilobytes(serverStats.totalBytes)).toMatchInlineSnapshot(`"212k"`)
|
||||
|
||||
const modules = await analyzeSizes(['node_modules/**/*'], serverDir)
|
||||
expect.soft(roundToKilobytes(modules.totalBytes)).toMatchInlineSnapshot(`"1383k"`)
|
||||
expect.soft(roundToKilobytes(modules.totalBytes)).toMatchInlineSnapshot(`"1384k"`)
|
||||
|
||||
const packages = modules.files
|
||||
.filter(m => m.endsWith('package.json'))
|
||||
|
@ -77,7 +77,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(`"560k"`)
|
||||
expect.soft(roundToKilobytes(serverStats.totalBytes)).toMatchInlineSnapshot(`"561k"`)
|
||||
|
||||
const modules = await analyzeSizes(['node_modules/**/*'], serverDir)
|
||||
expect.soft(roundToKilobytes(modules.totalBytes)).toMatchInlineSnapshot(`"84.1k"`)
|
||||
|
|
Loading…
Reference in New Issue