Skip to content

Commit 1e152a5

Browse files
fix conflict
1 parent 947f8a2 commit 1e152a5

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

src/content/learn/add-react-to-an-existing-project.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,7 @@ title: 将 React 添加到现有项目中
4545

4646
* **如果你的应用已经使用 `import` 语句来分割成不同的文件,请尝试利用已有的配置**。检查在你的 JavaScript 代码中编写 `<div />`是否会导致语法错误。如果有语法错误,你可能需要使用 [Babel](https://babeljs.io/setup) 转换你的 JavaScript 代码,并启用 [Babel React preset](https://babeljs.io/docs/babel-preset-react) 来使用 JSX。
4747

48-
<<<<<<< HEAD
4948
* **如果你的应用没有用于编译 JavaScript 模块的配置,请使用 [Vite](https://cn.vitejs.dev/) 进行配置**。Vite 社区维护了与后端框架(包括 Rails、Django 和 Laravel)的 [许多集成项目](https://github.com/vitejs/awesome-vite#integrations-with-backends)。如果你的后端框架没有列出,请 [按照此指南](https://cn.vitejs.dev/guide/backend-integration.html) 手动将 Vite 构建集成到你的后端。
50-
=======
51-
* **If your app doesn't have an existing setup for compiling JavaScript modules,** set it up with [Vite](https://vite.dev/). The Vite community maintains [many integrations with backend frameworks](https://github.com/vitejs/awesome-vite#integrations-with-backends), including Rails, Django, and Laravel. If your backend framework is not listed, [follow this guide](https://vite.dev/guide/backend-integration.html) to manually integrate Vite builds with your backend.
52-
>>>>>>> 6fc98fffdaad3b84e6093d1eb8def8f2cedeee16
5349

5450
如果想要检查你的配置是否有效,可以在项目文件夹中运行以下命令:
5551

@@ -89,11 +85,7 @@ root.render(<h1>Hello, world</h1>);
8985

9086
<Note>
9187

92-
<<<<<<< HEAD
93-
第一次将模块化 JavaScript 环境集成到现有项目中可能会让人感到害怕,但这是值得的!如果遇到困难,请尝试我们的 [社区资源](/community)[Vite Chat](https://chat.vitejs.dev/)
94-
=======
95-
Integrating a modular JavaScript environment into an existing project for the first time can feel intimidating, but it's worth it! If you get stuck, try our [community resources](/community) or the [Vite Chat](https://chat.vite.dev/).
96-
>>>>>>> 6fc98fffdaad3b84e6093d1eb8def8f2cedeee16
88+
第一次将模块化 JavaScript 环境集成到现有项目中可能会让人感到害怕,但这是值得的!如果遇到困难,请尝试我们的 [社区资源](/community)[Vite Chat](https://chat.vite.dev/)
9789

9890
</Note>
9991

src/content/learn/start-a-new-react-project.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,7 @@ translators:
3131

3232
此页面上的 React 框架默认解决此类问题,无需进行额外的工作。它们让你能够非常精简地开始,然后根据你的需求扩展应用程序。每个 React 框架都有一个社区,因此寻找问题的答案和升级工具变得更加容易。框架还为你的代码提供结构,帮助你和其他人保留不同项目之间的上下文和技巧。相反,使用自定义设置更容易陷入不受支持的依赖版本,并且你基本上最终会创建自己的框架——但这没有社区支持或升级路径(如果它和我们过去做的一样,设计得比较草率的话)。
3333

34-
<<<<<<< HEAD
3534
如果你的应用程序具有这些框架无法很好地满足的异常约束,或者你更喜欢自己解决这些问题,则可以使用 React 进行自己的自定义设置。从 npm 获取 `react``react-dom`,使用 [Vite](https://cn.vitejs.dev/)[Parcel](https://parceljs.org/) 等打包工具设置自定义构建流程,并根据需要添加其他工具用于路由、静态内容生成或服务端渲染等。
36-
=======
37-
If your app has unusual constraints not served well by these frameworks, or you prefer to solve these problems yourself, you can roll your own custom setup with React. Grab `react` and `react-dom` from npm, set up your custom build process with a bundler like [Vite](https://vite.dev/) or [Parcel](https://parceljs.org/), and add other tools as you need them for routing, static generation or server-side rendering, and more.
38-
>>>>>>> 6fc98fffdaad3b84e6093d1eb8def8f2cedeee16
3935

4036
</DeepDive>
4137

0 commit comments

Comments
 (0)