mxdraw 0.1.164 → 0.1.165
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/README.md +19 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -180,7 +180,25 @@ loadCoreCode().then(()=> {
|
|
|
180
180
|
|
|
181
181
|
|
|
182
182
|
## 按需引入配置
|
|
183
|
-
|
|
183
|
+
|
|
184
|
+
自"0.1.164"起不再需要配置按需引入, "0.1.164"以下可以选择以下配置:
|
|
185
|
+
|
|
186
|
+
> 使用`babel` 插件`babel-plugin-import` 实现按需引入
|
|
187
|
+
> 需要安装 `npm i babel-plugin-import -D` 然后找到或创建项目根目录的`.babelrc`文件新增如下内容
|
|
188
|
+
```json
|
|
189
|
+
{
|
|
190
|
+
"plugins": [
|
|
191
|
+
[
|
|
192
|
+
"import", {
|
|
193
|
+
"libraryName": "mxdraw",
|
|
194
|
+
"libraryDirectory": "dist/lib/MxModule",
|
|
195
|
+
"camel2UnderlineComponentName": false,
|
|
196
|
+
"camel2DashComponentName": false
|
|
197
|
+
}
|
|
198
|
+
]
|
|
199
|
+
]
|
|
200
|
+
}
|
|
201
|
+
```
|
|
184
202
|
|
|
185
203
|
> 基于`babel-plugin-import`按需引入
|
|
186
204
|
``` javascript
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mxdraw",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.165",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"homepage": "https://mxcad.github.io/mxdraw_docs/",
|
|
7
7
|
"module-min": "dist/mxdraw.esm.js",
|
|
8
8
|
"main": "dist/mxdraw.umd.js",
|
|
9
9
|
"module": "dist/mxdraw.esm.js",
|
|
10
|
-
"typings": "dist/
|
|
10
|
+
"typings": "dist/mxdraw.d.ts",
|
|
11
11
|
"files": [
|
|
12
12
|
"dist"
|
|
13
13
|
],
|