create-lve 0.6.10 → 0.6.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +0 -11
- package/package.json +1 -1
- package/template-react/vite.config.ts +10 -13
package/index.js
CHANGED
|
@@ -113,17 +113,6 @@ async function main() {
|
|
|
113
113
|
|
|
114
114
|
const s = p.spinner()
|
|
115
115
|
|
|
116
|
-
try {
|
|
117
|
-
execSync('vp --version', { stdio: 'ignore' })
|
|
118
|
-
} catch {
|
|
119
|
-
p.log.error(pc.red('未检测到 VitePlus (vp) 环境'))
|
|
120
|
-
p.note(
|
|
121
|
-
pc.white(`React/Vue 模板依赖 vp 工具链:\n${pc.cyan('https://viteplus.dev/guide')}`),
|
|
122
|
-
'环境缺失',
|
|
123
|
-
)
|
|
124
|
-
process.exit(1)
|
|
125
|
-
}
|
|
126
|
-
|
|
127
116
|
try {
|
|
128
117
|
if (project.shouldOverwrite) await fs.emptyDir(ctx.targetDir)
|
|
129
118
|
await fs.ensureDir(ctx.targetDir)
|
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineConfig, loadEnv, lazyPlugins
|
|
1
|
+
import { defineConfig, loadEnv, lazyPlugins } from 'vite-plus'
|
|
2
2
|
import react, { reactCompilerPreset } from '@vitejs/plugin-react'
|
|
3
3
|
|
|
4
4
|
const mode = process.env.NODE_ENV || 'development'
|
|
@@ -24,7 +24,7 @@ export default defineConfig({
|
|
|
24
24
|
presets: [reactCompilerPreset()],
|
|
25
25
|
}),
|
|
26
26
|
]
|
|
27
|
-
}) as
|
|
27
|
+
}) as any[],
|
|
28
28
|
],
|
|
29
29
|
resolve: {
|
|
30
30
|
tsconfigPaths: true,
|
|
@@ -32,17 +32,14 @@ export default defineConfig({
|
|
|
32
32
|
build: {
|
|
33
33
|
rolldownOptions: {
|
|
34
34
|
output: {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
if (id.includes('zustand')) return 'vendor-state'
|
|
44
|
-
if (id.includes('jotai')) return 'vendor-atom'
|
|
45
|
-
return 'vendor'
|
|
35
|
+
codeSplitting: {
|
|
36
|
+
groups: [
|
|
37
|
+
{
|
|
38
|
+
name: 'vendor',
|
|
39
|
+
test: /node_modules/,
|
|
40
|
+
minSize: 100 * 1024,
|
|
41
|
+
},
|
|
42
|
+
],
|
|
46
43
|
},
|
|
47
44
|
},
|
|
48
45
|
},
|