@dcloudio/vue-cli-plugin-uni 2.0.1-alpha-33720220111002 → 2.0.1-alpha-33820220114001
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/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-33820220114001",
|
|
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-33820220114001",
|
|
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": "20d5f695ce7acd61a5316e0ae6d77895c4c3a2f3"
|
|
43
43
|
}
|