@dcloudio/uni-cli-shared 3.0.0-alpha-4020820240914002 → 3.0.0-alpha-4030120240925001
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/dist/json/app/pages/uniConfig.js +2 -0
- package/dist/platform.js +1 -0
- package/dist/vite/cloud.js +4 -0
- package/dist/vite/extApi.js +21 -10
- package/dist/vite/plugins/vitejs/plugins/asset.js +3 -2
- package/dist/vite/plugins/vitejs/plugins/css.js +11 -4
- package/dist/vite/utils/utils.js +2 -1
- package/package.json +4 -4
|
@@ -36,6 +36,8 @@ function normalizeAppUniConfig(pagesJson, manifestJson) {
|
|
|
36
36
|
locales: (0, i18n_1.initLocales)(path_1.default.join(process.env.UNI_INPUT_DIR, 'locale')),
|
|
37
37
|
darkmode: platformConfig.darkmode || false,
|
|
38
38
|
themeConfig: (0, theme_1.normalizeThemeConfigOnce)(platformConfig),
|
|
39
|
+
// @ts-expect-error
|
|
40
|
+
qqMapKey: platformConfig?.distribute?.sdkConfigs?.maps?.qqmap?.key,
|
|
39
41
|
};
|
|
40
42
|
// TODO 待支持分包
|
|
41
43
|
return JSON.stringify(config);
|
package/dist/platform.js
CHANGED
package/dist/vite/cloud.js
CHANGED
|
@@ -247,6 +247,10 @@ function createExternal(config) {
|
|
|
247
247
|
if (path_1.default.isAbsolute(source)) {
|
|
248
248
|
return false;
|
|
249
249
|
}
|
|
250
|
+
// 'virtual:uno.css'
|
|
251
|
+
if (source.includes(':')) {
|
|
252
|
+
return false;
|
|
253
|
+
}
|
|
250
254
|
// android 系统库,三方库,iOS 的库呢?一般不包含.
|
|
251
255
|
if (source.includes('.')) {
|
|
252
256
|
return true;
|
package/dist/vite/extApi.js
CHANGED
|
@@ -8,25 +8,36 @@ function uniUniModulesExtApiPlugin() {
|
|
|
8
8
|
name: 'uni:uni-modules_ext-api',
|
|
9
9
|
apply: 'build',
|
|
10
10
|
config() {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
const rollupOptions = {
|
|
12
|
+
input: (0, resolve_1.resolveMainPathOnce)(process.env.UNI_INPUT_DIR),
|
|
13
|
+
external: ['vue'],
|
|
14
|
+
output: {
|
|
15
|
+
format: 'iife',
|
|
16
|
+
entryFileNames: 'components.js',
|
|
17
|
+
globals: {
|
|
18
|
+
vue: 'Vue',
|
|
19
|
+
uni: 'uni',
|
|
16
20
|
},
|
|
17
21
|
},
|
|
18
22
|
};
|
|
23
|
+
const build = {};
|
|
24
|
+
if (process.env.UNI_UTS_PLATFORM === 'app-ios') {
|
|
25
|
+
build.rollupOptions = rollupOptions;
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
build,
|
|
29
|
+
};
|
|
19
30
|
},
|
|
20
31
|
load(id) {
|
|
21
32
|
if ((0, uts_1.isUTSProxy)(id)) {
|
|
22
33
|
return '';
|
|
23
34
|
}
|
|
24
35
|
},
|
|
25
|
-
generateBundle(_, bundle) {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
},
|
|
36
|
+
// generateBundle(_, bundle) {
|
|
37
|
+
// Object.keys(bundle).forEach((fileName) => {
|
|
38
|
+
// console.log('fileName', fileName)
|
|
39
|
+
// })
|
|
40
|
+
// },
|
|
30
41
|
};
|
|
31
42
|
}
|
|
32
43
|
exports.uniUniModulesExtApiPlugin = uniUniModulesExtApiPlugin;
|
|
@@ -55,7 +55,7 @@ function assetPlugin(config, options) {
|
|
|
55
55
|
return {
|
|
56
56
|
name: 'vite:asset',
|
|
57
57
|
buildStart() {
|
|
58
|
-
assetCache.set(config, new Map());
|
|
58
|
+
assetCache.set(config, [new Map(), new Map()]);
|
|
59
59
|
emittedHashMap.set(config, new Set());
|
|
60
60
|
},
|
|
61
61
|
resolveId(id) {
|
|
@@ -267,7 +267,8 @@ function fileToBuiltUrl(id, config, pluginContext, skipPublicCheck = false, canI
|
|
|
267
267
|
if (!skipPublicCheck && checkPublicFile(id, config)) {
|
|
268
268
|
return config.base + id.slice(1);
|
|
269
269
|
}
|
|
270
|
-
const
|
|
270
|
+
const [cacheForUrl, cacheForBase64] = assetCache.get(config);
|
|
271
|
+
const cache = canInline ? cacheForBase64 : cacheForUrl;
|
|
271
272
|
const cached = cache.get(id);
|
|
272
273
|
if (cached) {
|
|
273
274
|
return cached;
|
|
@@ -232,7 +232,9 @@ function cssPostPlugin(config, { platform, isJsCode, preserveModules, chunkCssFi
|
|
|
232
232
|
const filename = chunkCssFilename(id);
|
|
233
233
|
if (filename) {
|
|
234
234
|
if (platform === 'app' &&
|
|
235
|
-
(filename === 'app.css' ||
|
|
235
|
+
(filename === 'app.css' ||
|
|
236
|
+
filename.startsWith('App.style') ||
|
|
237
|
+
filename.startsWith('App.uvue.style'))) {
|
|
236
238
|
// 获取 unocss 的样式文件信息
|
|
237
239
|
const ids = Object.keys(chunk.modules).filter((id) => styles.has(id) &&
|
|
238
240
|
(id.includes('__uno.css') || id.includes('-unocss-')));
|
|
@@ -260,11 +262,16 @@ function cssPostPlugin(config, { platform, isJsCode, preserveModules, chunkCssFi
|
|
|
260
262
|
if (filename) {
|
|
261
263
|
const ids = findCssModuleIds.call(this, id, includeComponentCss);
|
|
262
264
|
if (cssChunks.has(filename)) {
|
|
263
|
-
cssChunks.get(filename)
|
|
264
|
-
|
|
265
|
+
const oldIds = cssChunks.get(filename);
|
|
266
|
+
ids.forEach((id) => {
|
|
267
|
+
if (!oldIds.includes(id)) {
|
|
268
|
+
oldIds.push(id);
|
|
269
|
+
}
|
|
265
270
|
});
|
|
266
271
|
}
|
|
267
|
-
|
|
272
|
+
else {
|
|
273
|
+
cssChunks.set(filename, Array.from(ids));
|
|
274
|
+
}
|
|
268
275
|
}
|
|
269
276
|
});
|
|
270
277
|
}
|
package/dist/vite/utils/utils.js
CHANGED
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-4030120240925001",
|
|
4
4
|
"description": "@dcloudio/uni-cli-shared",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"@babel/core": "^7.23.3",
|
|
27
27
|
"@babel/parser": "^7.23.9",
|
|
28
28
|
"@babel/types": "^7.20.7",
|
|
29
|
-
"@dcloudio/uni-i18n": "3.0.0-alpha-
|
|
30
|
-
"@dcloudio/uni-shared": "3.0.0-alpha-
|
|
29
|
+
"@dcloudio/uni-i18n": "3.0.0-alpha-4030120240925001",
|
|
30
|
+
"@dcloudio/uni-shared": "3.0.0-alpha-4030120240925001",
|
|
31
31
|
"@intlify/core-base": "9.1.9",
|
|
32
32
|
"@intlify/shared": "9.1.9",
|
|
33
33
|
"@intlify/vue-devtools": "9.1.9",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
},
|
|
72
72
|
"gitHead": "33e807d66e1fe47e2ee08ad9c59247e37b8884da",
|
|
73
73
|
"devDependencies": {
|
|
74
|
-
"@dcloudio/uni-uts-v1": "3.0.0-alpha-
|
|
74
|
+
"@dcloudio/uni-uts-v1": "3.0.0-alpha-4030120240925001",
|
|
75
75
|
"@types/adm-zip": "^0.5.5",
|
|
76
76
|
"@types/babel__code-frame": "^7.0.6",
|
|
77
77
|
"@types/babel__core": "^7.1.19",
|