mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2025-12-11 21:12:50 +00:00
更新 uniappx 语言插件
This commit is contained in:
parent
798ecc7304
commit
e125957ef5
12
packages/vite-plugin/dist/index.js
vendored
12
packages/vite-plugin/dist/index.js
vendored
@ -2365,7 +2365,17 @@ if (typeof window !== 'undefined') {
|
|||||||
delete d[i];
|
delete d[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
code = JSON.stringify(d);
|
// 转字符串,不然会报错:Method too large
|
||||||
|
if (id.includes("/locale/")) {
|
||||||
|
let t = [];
|
||||||
|
d.forEach(([a, b]) => {
|
||||||
|
t.push(`${a}<__=__>${b}`);
|
||||||
|
});
|
||||||
|
code = JSON.stringify([[t.join("<__&__>")]]);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
code = JSON.stringify(d);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
code,
|
code,
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@cool-vue/vite-plugin",
|
"name": "@cool-vue/vite-plugin",
|
||||||
"version": "8.2.6",
|
"version": "8.2.7",
|
||||||
"description": "cool-admin、cool-uni builder",
|
"description": "cool-admin、cool-uni builder",
|
||||||
"types": "./dist/index.d.ts",
|
"types": "./dist/index.d.ts",
|
||||||
"main": "/dist/index.js",
|
"main": "/dist/index.js",
|
||||||
|
|||||||
@ -156,7 +156,18 @@ export function codePlugin(): Plugin[] {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
code = JSON.stringify(d);
|
// 转字符串,不然会报错:Method too large
|
||||||
|
if (id.includes("/locale/")) {
|
||||||
|
let t: string[] = [];
|
||||||
|
|
||||||
|
(d as string[][]).forEach(([a, b]) => {
|
||||||
|
t.push(`${a}<__=__>${b}`);
|
||||||
|
});
|
||||||
|
|
||||||
|
code = JSON.stringify([[t.join("<__&__>")]]);
|
||||||
|
} else {
|
||||||
|
code = JSON.stringify(d);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
@ -94,9 +94,6 @@ function postcssPlugin(): Plugin {
|
|||||||
{
|
{
|
||||||
postcssPlugin: "vite-cool-uniappx-class-mapping",
|
postcssPlugin: "vite-cool-uniappx-class-mapping",
|
||||||
prepare() {
|
prepare() {
|
||||||
// 存储 Tailwind 颜色值
|
|
||||||
const colorValues: Record<string, string> = {};
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
// 处理选择器规则
|
// 处理选择器规则
|
||||||
Rule(rule: any) {
|
Rule(rule: any) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user