File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -116,10 +116,10 @@ create-vite 是一个快速生成主流框架基础模板的工具。查看 Awes
116116
117117对于一个 ` https://github.com/user/project ` 中的模板,可以尝试使用 ` https://github.stackblitz.com/user/project ` (即在项目 URL 的 ` github ` 后添加 ` .stackblitz ` )。
118118
119- 你也可以用如 [ degit ] ( https://github.com/Rich-Harris/degit ) 之类的工具,使用社区模版来搭建项目。假设项目在 GitHub 上并使用 ` main ` 作为默认分支,可以使用以下命令创建本地副本:
119+ 你也可以用如 [ tiged ] ( https://github.com/tiged/tiged ) 之类的工具,使用社区模版来搭建项目。假设项目在 GitHub 上并使用 ` main ` 作为默认分支,可以使用以下命令创建本地副本:
120120
121121``` bash
122- npx degit user/project#main my-project
122+ npx tiged user/project my-project
123123cd my-project
124124
125125npm install
Original file line number Diff line number Diff line change @@ -114,13 +114,12 @@ export default defineConfig({
114114
115115精简工作的例子:
116116
117- - 使用 CSS 而不是 Sass/Less/Stylus(可以由 PostCSS 处理嵌套)
117+ - 使用 CSS 而不是 Sass/Less/Stylus(可以由 PostCSS / Lightning CSS 处理嵌套)
118118- 不要将 SVG 转换为 UI 框架组件(例如 React、Vue 等)。请将其作为字符串或 URL 导入。
119- - 当使用 ` @vitejs/plugin-react ` 时,避免配置 Babel 选项,这样它就会在构建期间跳过转换(只使用 esbuild )。
119+ - 当使用 ` @vitejs/plugin-react ` 时,避免配置 Babel 选项,这样它就会在构建期间跳过转换(只使用 Oxc )。
120120
121121使用更原生化工具链的例子:
122122
123- 使用更原生化的工具链往往会带来更大的安装大小,因此在启动新的 Vite 项目时不是默认的 。但对于较大的应用程序来说,这可能是值得的。
123+ 尽管 Vite 核心基于原生工具,但某些功能仍默认使用非原生工具,以提供更好的兼容性和功能集 。但对于较大的应用程序来说,这可能是值得的。
124124
125125- 尝试实验性的 [ LightningCSS] ( https://github.com/vitejs/vite/discussions/13835 )
126- - 使用 [ ` @vitejs/plugin-react-swc ` ] ( https://github.com/vitejs/vite-plugin-react-swc ) 代替 ` @vitejs/plugin-react ` 。
You can’t perform that action at this time.
0 commit comments