@dcloudio/uni-cli-shared 3.0.0-alpha-3041520220609002 → 3.0.0-alpha-3041520220610001
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.
|
@@ -3,9 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.uniViteCopyPlugin = void 0;
|
|
4
4
|
const watcher_1 = require("../../watcher");
|
|
5
5
|
const messages_1 = require("../../messages");
|
|
6
|
+
const logs_1 = require("../../logs");
|
|
6
7
|
function uniViteCopyPlugin({ targets, verbose, }) {
|
|
7
8
|
let resolvedConfig;
|
|
8
|
-
let
|
|
9
|
+
let initialized = false;
|
|
9
10
|
return {
|
|
10
11
|
name: 'uni:copy',
|
|
11
12
|
apply: 'build',
|
|
@@ -13,13 +14,13 @@ function uniViteCopyPlugin({ targets, verbose, }) {
|
|
|
13
14
|
resolvedConfig = config;
|
|
14
15
|
},
|
|
15
16
|
writeBundle() {
|
|
16
|
-
if (
|
|
17
|
+
if (initialized) {
|
|
17
18
|
return;
|
|
18
19
|
}
|
|
19
20
|
if (resolvedConfig.build.ssr) {
|
|
20
21
|
return;
|
|
21
22
|
}
|
|
22
|
-
|
|
23
|
+
initialized = true;
|
|
23
24
|
return new Promise((resolve) => {
|
|
24
25
|
Promise.all(targets.map(({ watchOptions, ...target }) => {
|
|
25
26
|
return new Promise((resolve) => {
|
|
@@ -40,7 +41,8 @@ function uniViteCopyPlugin({ targets, verbose, }) {
|
|
|
40
41
|
resolve(void 0);
|
|
41
42
|
}
|
|
42
43
|
}, () => {
|
|
43
|
-
|
|
44
|
+
// TODO 目前初始化编译时,也会不停地触发此函数。
|
|
45
|
+
(0, logs_1.output)('log', messages_1.M['dev.watching.end']);
|
|
44
46
|
});
|
|
45
47
|
});
|
|
46
48
|
})).then(() => resolve());
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcloudio/uni-cli-shared",
|
|
3
|
-
"version": "3.0.0-alpha-
|
|
3
|
+
"version": "3.0.0-alpha-3041520220610001",
|
|
4
4
|
"description": "@dcloudio/uni-cli-shared",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"@babel/core": "^7.17.9",
|
|
23
23
|
"@babel/parser": "^7.17.9",
|
|
24
24
|
"@babel/types": "^7.17.0",
|
|
25
|
-
"@dcloudio/uni-i18n": "3.0.0-alpha-
|
|
26
|
-
"@dcloudio/uni-shared": "3.0.0-alpha-
|
|
25
|
+
"@dcloudio/uni-i18n": "3.0.0-alpha-3041520220610001",
|
|
26
|
+
"@dcloudio/uni-shared": "3.0.0-alpha-3041520220610001",
|
|
27
27
|
"@intlify/core-base": "9.1.9",
|
|
28
28
|
"@intlify/shared": "9.1.9",
|
|
29
29
|
"@intlify/vue-devtools": "9.1.9",
|