Skip to content

Commit 9ccf662

Browse files
author
guchengwei
committed
add changelog in README
1 parent ea6941a commit 9ccf662

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,30 @@ mpvueSimple.build() // => Promise
3737
```
3838

3939
## changelog
40+
#### `1.0.18`
41+
42+
- 加入可选配置项 `output.external`,通过在webpack中增加external属性的方式,可以在打包的时候移除公共模块的引入,从而减小包大小。
43+
44+
在构建脚本中进行如下定义:
45+
46+
```javascript
47+
mpvueSimple.build({
48+
externals: {
49+
sdk: 'require("../../../../sdk")', // 公共模块的相对路径
50+
},
51+
})
52+
```
53+
54+
在页面文件中进行如下引用:
55+
56+
```javascript
57+
import SDK from 'sdk'; // 注意这里的sdk,应为externals的key
58+
```
59+
60+
61+
4062

4163
#### `1.0.17`
64+
4265
- 加入可选配置项 `output.jsonpFunction`,mpvue 打包构建后会在 `manifest.js` 中生生成全局的模块加载器函数 `global.webpackJsonp`,为防止和其它构建工具引起命名冲突,该默认函数名可在 output 配置中指定,示例如上。
4366

0 commit comments

Comments
 (0)