We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ea6941a commit 9ccf662Copy full SHA for 9ccf662
README.md
@@ -37,7 +37,30 @@ mpvueSimple.build() // => Promise
37
```
38
39
## 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
57
+ import SDK from 'sdk'; // 注意这里的sdk,应为externals的key
58
59
60
61
62
63
#### `1.0.17`
64
65
- 加入可选配置项 `output.jsonpFunction`,mpvue 打包构建后会在 `manifest.js` 中生生成全局的模块加载器函数 `global.webpackJsonp`,为防止和其它构建工具引起命名冲突,该默认函数名可在 output 配置中指定,示例如上。
66
0 commit comments