@dcloudio/vue-cli-plugin-uni 2.0.1-alpha-33720220111001 → 2.0.1-alpha-33820220118002
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/commands/build.js +14 -12
- package/lib/env.js +1 -3
- package/lib/mp/index.js +7 -6
- package/package.json +3 -3
- package/packages/mp-vue/dist/mp.runtime.esm.js +6 -5
package/commands/build.js
CHANGED
|
@@ -34,7 +34,7 @@ module.exports = (api, options) => {
|
|
|
34
34
|
'--auto-host': 'specify automator host',
|
|
35
35
|
'--auto-port': 'specify automator port',
|
|
36
36
|
'--subpackage': 'specify subpackage',
|
|
37
|
-
'--plugin': 'specify plugin',
|
|
37
|
+
'--plugin': 'specify mp plugin',
|
|
38
38
|
'--manifest': 'build manifest.json'
|
|
39
39
|
}
|
|
40
40
|
}, async (args) => {
|
|
@@ -244,17 +244,19 @@ function analysisPluginDir () {
|
|
|
244
244
|
const pluginJson = parseJson(fs.readFileSync(pluginJsonPath, 'utf-8'), true)
|
|
245
245
|
|
|
246
246
|
// main 入口文件是否存在
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
247
|
+
if (pluginJson.main) {
|
|
248
|
+
process.env.UNI_MP_PLUGIN_MAIN = pluginJson.main
|
|
249
|
+
const UNI_MP_PLUGIN_MAIN = process.env.UNI_MP_PLUGIN_MAIN
|
|
250
|
+
const mainFilePath = path.resolve(process.env.UNI_INPUT_DIR, UNI_MP_PLUGIN_MAIN)
|
|
251
|
+
|
|
252
|
+
if (UNI_MP_PLUGIN_MAIN && !fs.pathExistsSync(mainFilePath)) {
|
|
253
|
+
console.log()
|
|
254
|
+
console.error(uniI18n.__('pluginUni.entryDileNoExistsCheckAfterRetry', {
|
|
255
|
+
0: UNI_MP_PLUGIN_MAIN
|
|
256
|
+
}))
|
|
257
|
+
console.log()
|
|
258
|
+
process.exit(0)
|
|
259
|
+
}
|
|
258
260
|
}
|
|
259
261
|
}
|
|
260
262
|
|
package/lib/env.js
CHANGED
|
@@ -352,9 +352,7 @@ if (process.env.UNI_USING_NATIVE || process.env.UNI_USING_V3_NATIVE) {
|
|
|
352
352
|
if (process.env.UNI_PLATFORM === 'app-plus') {
|
|
353
353
|
const pagesPkg = require('@dcloudio/webpack-uni-pages-loader/package.json')
|
|
354
354
|
if (pagesPkg) {
|
|
355
|
-
|
|
356
|
-
info = uniI18n.__('compilerVersion') + ':' + pagesPkg['uni-app'].compilerVersion + (process.env.UNI_USING_V3
|
|
357
|
-
? v3Tips : '')
|
|
355
|
+
info = uniI18n.__('compilerVersion') + ':' + pagesPkg['uni-app'].compilerVersion
|
|
358
356
|
}
|
|
359
357
|
if (process.env.UNI_USING_V3) {
|
|
360
358
|
console.log(info)
|
package/lib/mp/index.js
CHANGED
|
@@ -178,11 +178,12 @@ module.exports = {
|
|
|
178
178
|
|
|
179
179
|
{
|
|
180
180
|
const globalEnv = process.env.UNI_PLATFORM === 'mp-alipay' ? 'my' : 'wx';
|
|
181
|
-
[].concat(
|
|
182
|
-
.
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
181
|
+
[].concat(
|
|
182
|
+
process.env.UNI_MP_PLUGIN
|
|
183
|
+
? process.env.UNI_MP_PLUGIN_MAIN
|
|
184
|
+
: JSON.parse(process.env.UNI_MP_PLUGIN_EXPORT)
|
|
185
|
+
).forEach(fileName => addToUniEntry(fileName))
|
|
186
|
+
beforeCode += `${globalEnv}.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;`
|
|
186
187
|
}
|
|
187
188
|
|
|
188
189
|
const alias = { // 仅 mp-weixin
|
|
@@ -319,4 +320,4 @@ module.exports = {
|
|
|
319
320
|
webpackConfig.plugins.delete('preload')
|
|
320
321
|
webpackConfig.plugins.delete('prefetch')
|
|
321
322
|
}
|
|
322
|
-
}
|
|
323
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcloudio/vue-cli-plugin-uni",
|
|
3
|
-
"version": "2.0.1-alpha-
|
|
3
|
+
"version": "2.0.1-alpha-33820220118002",
|
|
4
4
|
"description": "uni-app plugin for vue-cli 3",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"author": "fxy060608",
|
|
18
18
|
"license": "Apache-2.0",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@dcloudio/uni-stat": "^2.0.1-alpha-
|
|
20
|
+
"@dcloudio/uni-stat": "^2.0.1-alpha-33820220118002",
|
|
21
21
|
"buffer-json": "^2.0.0",
|
|
22
22
|
"clone-deep": "^4.0.1",
|
|
23
23
|
"copy-webpack-plugin": "^5.1.1",
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"wrap-loader": "^0.2.0",
|
|
40
40
|
"xregexp": "4.0.0"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "c109a58cdc4ecf3b49bf256fbec6d570c3c110e1"
|
|
43
43
|
}
|
|
@@ -5827,9 +5827,10 @@ function internalMixin(Vue) {
|
|
|
5827
5827
|
|
|
5828
5828
|
Vue.prototype.$emit = function(event) {
|
|
5829
5829
|
if (this.$scope && event) {
|
|
5830
|
-
(this.$scope['_triggerEvent'] || this.$scope['triggerEvent'])
|
|
5831
|
-
|
|
5832
|
-
|
|
5830
|
+
(this.$scope['_triggerEvent'] || this.$scope['triggerEvent'])
|
|
5831
|
+
.call(this.$scope, event, {
|
|
5832
|
+
__args__: toArray(arguments, 1)
|
|
5833
|
+
})
|
|
5833
5834
|
}
|
|
5834
5835
|
return oldEmit.apply(this, arguments)
|
|
5835
5836
|
};
|
|
@@ -5893,7 +5894,7 @@ function internalMixin(Vue) {
|
|
|
5893
5894
|
if (!target) {
|
|
5894
5895
|
target = this;
|
|
5895
5896
|
}
|
|
5896
|
-
// 解决动态属性添加
|
|
5897
|
+
// 解决动态属性添加
|
|
5897
5898
|
Vue.set(target, key, value)
|
|
5898
5899
|
};
|
|
5899
5900
|
|
|
@@ -5901,7 +5902,7 @@ function internalMixin(Vue) {
|
|
|
5901
5902
|
if (!target) {
|
|
5902
5903
|
target = this;
|
|
5903
5904
|
}
|
|
5904
|
-
// 解决动态属性添加
|
|
5905
|
+
// 解决动态属性添加
|
|
5905
5906
|
Vue.set(target, key, value)
|
|
5906
5907
|
};
|
|
5907
5908
|
|