Skip to content

Commit

Permalink
feat: add plugin to replace icons
Browse files Browse the repository at this point in the history
  • Loading branch information
oasis-cloud committed Oct 29, 2024
1 parent d338950 commit f3d6ec4
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions packages/nutui-replace-icons/README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# @nutui/replace-icons

## 功能说明

用于替换组件库内置的 Icon 库。

## 使用方法

1. 在 config/index.js 文件中增加如下代码
### Taro 生态下

1. Taro 环境中需要在 config/index.js 文件中增加如下代码

```html
{ h5: { compile: { include: [path.resolve(__dirname, '../node_modules')], } },
mini: { compile: { include: [path.resolve(__dirname, '../node_modules')], } } }
```

1. 在 babel.config.js 文件中增加如下代码
2. 在 babel.config.js 文件中增加如下代码

```js
const { repleaceIcons } = require('@dongdesign/replace-icons')
Expand All @@ -31,6 +31,10 @@ const { repleaceIcons } = require('@dongdesign/replace-icons')
}
```

### H5 生态下

1. 需要将 nutui 组件库包含在编译中。

### 原始代码

```jsx
Expand Down

0 comments on commit f3d6ec4

Please sign in to comment.