Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(harmony): 更新鸿蒙文档 #215

Merged
merged 8 commits into from
Dec 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions versioned_docs/version-4.x/harmony.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,17 +107,22 @@ npm i -g @tarojs/[email protected]

#### 项目依赖

如您是新项目,创建项目时选择鸿蒙模板即可;
如您是新项目,创建项目时推荐创建编译器为 `vite` 的模板,若创建项目选择了 `webpack` 或 `webpack5` 的模板,则需要手动安装 `vite`、`terser` 以及 `@tarojs/vite-runner`;

旧项目需要把  `package.json`  文件中 Taro 相关依赖的版本修改为  `~4.0.0-beta.0`,再重新安装依赖。
```bash
$ npm i vite@^4.2.0
$ npm i terser@^5.4.0
$ npm i @tarojs/[email protected]
```

旧项目需要把  `package.json`  文件中 Taro 相关依赖的版本修改为  `~4.0.0-beta.0`,再重新安装依赖,并添加上述三个和 `vite` 相关的依赖。

> 如果安装失败或打开项目失败,可以删除  **node_modules**、**yarn.lock**、**package-lock.json**  后重新安装依赖再尝试。

### 2. 安装 Taro 适配鸿蒙插件和 Vite 编译插件
### 2. 安装 Taro 适配鸿蒙插件

```bash
$ npm i @tarojs/[email protected]
$ npm i @tarojs/[email protected]
```

### 3. 修改 Taro 编译配置
Expand Down
Loading