Skip to content

Commit 7ae2cf5

Browse files
committed
perf(kit,schema): remove some unnecessary dependencies
1 parent 8789514 commit 7ae2cf5

File tree

8 files changed

+12
-24
lines changed

8 files changed

+12
-24
lines changed

packages/kit/build.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,6 @@ export default defineBuildConfig({
2020
'webpack',
2121
'vite',
2222
'h3',
23+
'unimport',
2324
],
2425
})

packages/kit/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,9 @@
4343
"rc9": "^2.1.2",
4444
"scule": "^1.3.0",
4545
"semver": "^7.7.3",
46-
"std-env": "^3.9.0",
4746
"tinyglobby": "^0.2.15",
4847
"ufo": "^1.6.1",
4948
"unctx": "^2.4.1",
50-
"unimport": "^5.4.1",
5149
"untyped": "^2.0.0"
5250
},
5351
"devDependencies": {
@@ -57,6 +55,7 @@
5755
"hookable": "5.5.3",
5856
"nitropack": "2.12.7",
5957
"unbuild": "3.6.1",
58+
"unimport": "5.4.1",
6059
"vite": "7.1.9",
6160
"vitest": "3.2.4",
6261
"webpack": "5.102.0"

packages/schema/build.config.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ export default defineBuildConfig({
2222
'autoprefixer',
2323
'c12',
2424
'compatx',
25-
'consola',
2625
'css-minimizer-webpack-plugin',
2726
'cssnano',
2827
'esbuild',
@@ -56,6 +55,5 @@ export default defineBuildConfig({
5655
// Implicit
5756
'@vue/compiler-core',
5857
'@vue/compiler-sfc',
59-
'@vue/shared',
6058
],
6159
})

packages/schema/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,10 @@
7676
},
7777
"dependencies": {
7878
"@vue/shared": "^3.5.22",
79-
"consola": "^3.4.2",
8079
"defu": "^6.1.4",
8180
"pathe": "^2.0.3",
8281
"pkg-types": "^2.3.0",
83-
"std-env": "^3.9.0",
84-
"ufo": "1.6.1"
82+
"std-env": "^3.9.0"
8583
},
8684
"engines": {
8785
"node": "^14.18.0 || >=16.10.0"

packages/schema/src/config/build.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { defu } from 'defu'
22
import { join } from 'pathe'
33
import { isTest } from 'std-env'
4-
import { consola } from 'consola'
54
import type { Nuxt } from '../types/nuxt'
65
import { defineResolvers } from '../utils/definition'
76

@@ -39,7 +38,7 @@ export default defineResolvers({
3938
logLevel: {
4039
$resolve: (val) => {
4140
if (val && typeof val === 'string' && !['silent', 'info', 'verbose'].includes(val)) {
42-
consola.warn(`Invalid \`logLevel\` option: \`${val}\`. Must be one of: \`silent\`, \`info\`, \`verbose\`.`)
41+
console.warn(`Invalid \`logLevel\` option: \`${val}\`. Must be one of: \`silent\`, \`info\`, \`verbose\`.`)
4342
}
4443
return val && typeof val === 'string' ? val as 'silent' | 'info' | 'verbose' : (isTest ? 'silent' : 'info')
4544
},

packages/schema/src/config/common.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import { findWorkspaceDir } from 'pkg-types'
99
import type { NuxtDebugOptions } from '../types/debug'
1010
import type { NuxtModule } from '../types/module'
1111
import { defineResolvers } from '../utils/definition'
12-
import { withTrailingSlash } from 'ufo'
1312

1413
export default defineResolvers({
1514
extends: undefined,
@@ -295,3 +294,7 @@ function provideFallbackValues (obj: Record<string, any>) {
295294
}
296295
}
297296
}
297+
298+
function withTrailingSlash (str: string) {
299+
return str.replace(/\/?$/, '/')
300+
}

packages/schema/src/config/vite.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { consola } from 'consola'
21
import defu from 'defu'
32
import { resolve } from 'pathe'
43
import { isTest } from 'std-env'
@@ -31,7 +30,7 @@ export default defineResolvers({
3130
publicDir: {
3231
$resolve: (val) => {
3332
if (val) {
34-
consola.warn('Directly configuring the `vite.publicDir` option is not supported. Instead, set `dir.public`. You can read more in `https://nuxt.com/docs/4.x/api/nuxt-config#public`.')
33+
console.warn('Directly configuring the `vite.publicDir` option is not supported. Instead, set `dir.public`. You can read more in `https://nuxt.com/docs/4.x/api/nuxt-config#public`.')
3534
}
3635
// this is missing from our `vite` types deliberately, so users do not configure it
3736
return false as never

pnpm-lock.yaml

Lines changed: 3 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)