mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2025-12-10 11:52:53 +00:00
优化
This commit is contained in:
parent
9e4981c2d4
commit
01a0917555
7
packages/vite-plugin/dist/index.js
vendored
7
packages/vite-plugin/dist/index.js
vendored
@ -2150,6 +2150,10 @@ if (typeof window !== 'undefined') {
|
||||
const { darkTextClass } = config.tailwind;
|
||||
// 判断是否为 uvue 文件
|
||||
if (id.endsWith(".uvue") || id.includes(".uvue?type=page")) {
|
||||
// 避免影响到其他模块/插件
|
||||
if (id.includes("uni_modules/") && !id.includes("uni_modules/cool-")) {
|
||||
return null;
|
||||
}
|
||||
let modifiedCode = code;
|
||||
// 获取所有节点
|
||||
const nodes = getNodes(code);
|
||||
@ -2353,6 +2357,9 @@ if (typeof window !== 'undefined') {
|
||||
if (!ctx.tabBar) {
|
||||
ctx.tabBar = {};
|
||||
}
|
||||
if (!ctx.uniIdRouter) {
|
||||
ctx.uniIdRouter = {};
|
||||
}
|
||||
// 安全字符映射
|
||||
ctx["SAFE_CHAR_MAP_LOCALE"] = [];
|
||||
for (const i in SAFE_CHAR_MAP_LOCALE) {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@cool-vue/vite-plugin",
|
||||
"version": "8.2.18",
|
||||
"version": "8.2.19",
|
||||
"description": "cool-admin、cool-uni builder",
|
||||
"types": "./dist/index.d.ts",
|
||||
"main": "/dist/index.js",
|
||||
|
||||
@ -115,6 +115,10 @@ export function codePlugin(): Plugin[] {
|
||||
ctx.tabBar = {};
|
||||
}
|
||||
|
||||
if (!ctx.uniIdRouter) {
|
||||
ctx.uniIdRouter = {};
|
||||
}
|
||||
|
||||
// 安全字符映射
|
||||
ctx["SAFE_CHAR_MAP_LOCALE"] = [];
|
||||
for (const i in SAFE_CHAR_MAP_LOCALE) {
|
||||
|
||||
@ -272,6 +272,11 @@ function transformPlugin(): Plugin {
|
||||
|
||||
// 判断是否为 uvue 文件
|
||||
if (id.endsWith(".uvue") || id.includes(".uvue?type=page")) {
|
||||
// 避免影响到其他模块/插件
|
||||
if (id.includes("uni_modules/") && !id.includes("uni_modules/cool-")) {
|
||||
return null;
|
||||
}
|
||||
|
||||
let modifiedCode = code;
|
||||
|
||||
// 获取所有节点
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user