mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2025-12-14 14:52:49 +00:00
解决 unix 无法添加注释
This commit is contained in:
parent
c46054a5f6
commit
a93b56f883
3
packages/vite-plugin/dist/index.js
vendored
3
packages/vite-plugin/dist/index.js
vendored
@ -2065,6 +2065,9 @@ if (typeof window !== 'undefined') {
|
|||||||
const nodes = getNodes(code);
|
const nodes = getNodes(code);
|
||||||
// 遍历处理每个节点
|
// 遍历处理每个节点
|
||||||
nodes.forEach((node) => {
|
nodes.forEach((node) => {
|
||||||
|
if (node.startsWith("<!--")) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
let _node = node;
|
let _node = node;
|
||||||
// 兼容 <input /> 标签
|
// 兼容 <input /> 标签
|
||||||
if (_node.startsWith("<input")) {
|
if (_node.startsWith("<input")) {
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@cool-vue/vite-plugin",
|
"name": "@cool-vue/vite-plugin",
|
||||||
"version": "8.2.2",
|
"version": "8.2.3",
|
||||||
"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",
|
||||||
|
|||||||
@ -11,21 +11,6 @@ import {
|
|||||||
isTailwindClass,
|
isTailwindClass,
|
||||||
} from "./utils";
|
} from "./utils";
|
||||||
|
|
||||||
/**
|
|
||||||
* Tailwind 默认值
|
|
||||||
*/
|
|
||||||
const TW_DEFAULT_VALUES: Record<string, string | number> = {
|
|
||||||
"--tw-border-spacing-x": 0,
|
|
||||||
"--tw-border-spacing-y": 0,
|
|
||||||
"--tw-translate-x": 0,
|
|
||||||
"--tw-translate-y": 0,
|
|
||||||
"--tw-rotate": 0,
|
|
||||||
"--tw-skew-x": 0,
|
|
||||||
"--tw-skew-y": 0,
|
|
||||||
"--tw-scale-x": 1,
|
|
||||||
"--tw-scale-y": 1,
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 转换类名中的特殊字符为安全字符
|
* 转换类名中的特殊字符为安全字符
|
||||||
*/
|
*/
|
||||||
@ -294,6 +279,10 @@ function transformPlugin(): Plugin {
|
|||||||
|
|
||||||
// 遍历处理每个节点
|
// 遍历处理每个节点
|
||||||
nodes.forEach((node) => {
|
nodes.forEach((node) => {
|
||||||
|
if (node.startsWith("<!--")) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let _node = node;
|
let _node = node;
|
||||||
|
|
||||||
// 兼容 <input /> 标签
|
// 兼容 <input /> 标签
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user