@dcloudio/vue-cli-plugin-uni 2.0.1-alpha-36020220830002 → 2.0.1-alpha-36120220907001
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/lib/copy-webpack-options.js +7 -24
- package/package.json +3 -3
|
@@ -92,16 +92,14 @@ function getCopyWebpackPluginOptions (platformOptions, vueOptions) {
|
|
|
92
92
|
})
|
|
93
93
|
// 自动化测试时,不启用androidPrivacy.json
|
|
94
94
|
if (process.env.UNI_PLATFORM === 'app-plus' && !process.env.UNI_AUTOMATOR_WS_ENDPOINT) {
|
|
95
|
-
const from = 'android*.json'
|
|
96
95
|
const fileName = 'androidPrivacy.json'
|
|
97
96
|
const context = path.resolve(process.env.UNI_INPUT_DIR)
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
if (path.endsWith(fileName)) {
|
|
97
|
+
if (fs.existsSync(path.join(context, fileName))) {
|
|
98
|
+
copyOptions.push({
|
|
99
|
+
from: fileName,
|
|
100
|
+
context,
|
|
101
|
+
to: fileName,
|
|
102
|
+
transform (content) {
|
|
105
103
|
const options = initI18nOptions(
|
|
106
104
|
process.env.UNI_PLATFORM,
|
|
107
105
|
process.env.UNI_INPUT_DIR,
|
|
@@ -113,22 +111,7 @@ function getCopyWebpackPluginOptions (platformOptions, vueOptions) {
|
|
|
113
111
|
}
|
|
114
112
|
return compileI18nJsonStr(content.toString(), options)
|
|
115
113
|
}
|
|
116
|
-
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
// copy-webpack-plugin/glob-parent 存在 Bug,例如:/test/dir(1
|
|
120
|
-
const globParent = require(require.resolve('glob-parent', { paths: [require.resolve('copy-webpack-plugin')] }))
|
|
121
|
-
const parent = globParent(path.join(context, from))
|
|
122
|
-
let canNotWatch
|
|
123
|
-
if (parent !== context) {
|
|
124
|
-
options.from = fileName
|
|
125
|
-
if (!fs.existsSync(path.join(context, fileName))) {
|
|
126
|
-
canNotWatch = true
|
|
127
|
-
// console.warn(`invalid path: ${context}, can not watch ${fileName}`)
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
if (!canNotWatch) {
|
|
131
|
-
copyOptions.push(options)
|
|
114
|
+
})
|
|
132
115
|
}
|
|
133
116
|
}
|
|
134
117
|
return copyOptions
|
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-36120220907001",
|
|
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-36120220907001",
|
|
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": "2290dd0b6f192129af9c6be83819277dff40fc66"
|
|
45
45
|
}
|