@dcloudio/vue-cli-plugin-uni 2.0.2-alpha-3070720230317001 → 2.0.2-alpha-3070820230320001
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 +6 -1
- package/lib/copy-webpack-options.js +1 -1
- package/lib/env.js +9 -3
- package/lib/error-reporting.js +2 -0
- package/package.json +3 -3
package/commands/build.js
CHANGED
|
@@ -6,7 +6,8 @@ const {
|
|
|
6
6
|
isInHBuilderX,
|
|
7
7
|
parseJson,
|
|
8
8
|
parsePagesJson,
|
|
9
|
-
parseManifestJson
|
|
9
|
+
parseManifestJson,
|
|
10
|
+
showRunPrompt
|
|
10
11
|
} = require('@dcloudio/uni-cli-shared')
|
|
11
12
|
|
|
12
13
|
const uniI18n = require('@dcloudio/uni-cli-i18n')
|
|
@@ -207,6 +208,9 @@ async function build (args, api, options) {
|
|
|
207
208
|
const dirMsg = runByHBuilderX ? ''
|
|
208
209
|
: `The ${chalk.cyan(targetDirShort)} directory is ready to be deployed.`
|
|
209
210
|
done(`Build complete. ${dirMsg}`)
|
|
211
|
+
if (process.env.UNI_PLATFORM !== 'h5') {
|
|
212
|
+
showRunPrompt()
|
|
213
|
+
}
|
|
210
214
|
|
|
211
215
|
if (process.env.UNI_PLATFORM === 'h5' && !isInHBuilderX) {
|
|
212
216
|
console.log()
|
|
@@ -216,6 +220,7 @@ async function build (args, api, options) {
|
|
|
216
220
|
const dirMsg = runByHBuilderX ? ''
|
|
217
221
|
: `The ${chalk.cyan(targetDirShort)} directory is ready. `
|
|
218
222
|
done(`Build complete. ${dirMsg}Watching for changes...`)
|
|
223
|
+
showRunPrompt()
|
|
219
224
|
}
|
|
220
225
|
}
|
|
221
226
|
|
|
@@ -37,7 +37,7 @@ function getAssetsCopyOptions (assetsDir) {
|
|
|
37
37
|
|
|
38
38
|
global.uniPlugin.platforms.forEach(platform => {
|
|
39
39
|
if (global.uniPlugin.name !== platform) {
|
|
40
|
-
ignore.push(
|
|
40
|
+
ignore.push(`${process.env.UNI_INPUT_DIR.replace(/\\/g, '/')}/static/${platform}/**/*`)
|
|
41
41
|
}
|
|
42
42
|
})
|
|
43
43
|
|
package/lib/env.js
CHANGED
|
@@ -128,7 +128,7 @@ if (!process.env.UNI_CLOUD_PROVIDER && process.env.UNI_CLOUD_SPACES) {
|
|
|
128
128
|
}
|
|
129
129
|
}))
|
|
130
130
|
}
|
|
131
|
-
} catch (e) {}
|
|
131
|
+
} catch (e) { }
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
// 安全网络
|
|
@@ -256,7 +256,7 @@ if (process.env.UNI_PLATFORM === 'h5') {
|
|
|
256
256
|
try {
|
|
257
257
|
const modules = require('@dcloudio/uni-h5/lib/modules.json')
|
|
258
258
|
process.UNI_USER_APIS = parseUserApis(treeShaking.modules || [], modules)
|
|
259
|
-
} catch (e) {}
|
|
259
|
+
} catch (e) { }
|
|
260
260
|
}
|
|
261
261
|
}
|
|
262
262
|
if (optimization.prefetch) {
|
|
@@ -350,6 +350,12 @@ if ((process.env.UNI_PLATFORM === 'mp-kuaishou' || process.env.UNI_PLATFORM ===
|
|
|
350
350
|
.SCOPED_SLOTS_COMPILER !== modes[0]) {
|
|
351
351
|
process.env.SCOPED_SLOTS_COMPILER = modes[2]
|
|
352
352
|
}
|
|
353
|
+
const slotMultipleInstance = !!platformOptions.slotMultipleInstance
|
|
354
|
+
// 配置 slotMultipleInstance 时,切换 scopedSlotsCompiler 的值 auto 为 augmented 模式
|
|
355
|
+
if (slotMultipleInstance && process.env.SCOPED_SLOTS_COMPILER === modes[1]) {
|
|
356
|
+
process.env.SCOPED_SLOTS_COMPILER = modes[2]
|
|
357
|
+
}
|
|
358
|
+
process.env.SLOT_MULTIPLE_INSTANCE = (slotMultipleInstance).toString()
|
|
353
359
|
|
|
354
360
|
process.env.MERGE_VIRTUAL_HOST_ATTRIBUTES = (!!platformOptions.mergeVirtualHostAttributes).toString()
|
|
355
361
|
|
|
@@ -479,7 +485,7 @@ if (process.env.UNI_USING_NATIVE || process.env.UNI_USING_V3_NATIVE) {
|
|
|
479
485
|
console.log(warningMsg)
|
|
480
486
|
}
|
|
481
487
|
}
|
|
482
|
-
} catch (e) {}
|
|
488
|
+
} catch (e) { }
|
|
483
489
|
}
|
|
484
490
|
if (process.env.NODE_ENV !== 'production') { // 运行模式性能提示
|
|
485
491
|
let perfMsg = uniI18n.__('pluginUni.runDebugMode')
|
package/lib/error-reporting.js
CHANGED
|
@@ -153,8 +153,10 @@ global.__error_reporting__ = report
|
|
|
153
153
|
|
|
154
154
|
process
|
|
155
155
|
.on('unhandledRejection', (reason, p) => {
|
|
156
|
+
console.log(reason)
|
|
156
157
|
global.__error_reporting__ && global.__error_reporting__('unhandledRejection', reason)
|
|
157
158
|
})
|
|
158
159
|
.on('uncaughtException', err => {
|
|
160
|
+
console.log(err)
|
|
159
161
|
global.__error_reporting__ && global.__error_reporting__('uncaughtException', err.stack)
|
|
160
162
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcloudio/vue-cli-plugin-uni",
|
|
3
|
-
"version": "2.0.2-alpha-
|
|
3
|
+
"version": "2.0.2-alpha-3070820230320001",
|
|
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.2-alpha-
|
|
20
|
+
"@dcloudio/uni-stat": "^2.0.2-alpha-3070820230320001",
|
|
21
21
|
"buffer-json": "^2.0.0",
|
|
22
22
|
"clone-deep": "^4.0.1",
|
|
23
23
|
"cross-env": "^5.2.0",
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"copy-webpack-plugin": ">=5",
|
|
42
42
|
"postcss": ">=7"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "1090682afce7519212cf936b6c49ce1321a95cd1"
|
|
45
45
|
}
|