解决 unix 无法添加注释

This commit is contained in:
icssoa 2025-07-23 16:53:38 +08:00
parent c46054a5f6
commit a93b56f883
3 changed files with 8 additions and 16 deletions

View File

@ -2065,6 +2065,9 @@ if (typeof window !== 'undefined') {
const nodes = getNodes(code);
// 遍历处理每个节点
nodes.forEach((node) => {
if (node.startsWith("<!--")) {
return;
}
let _node = node;
// 兼容 <input /> 标签
if (_node.startsWith("<input")) {

View File

@ -1,6 +1,6 @@
{
"name": "@cool-vue/vite-plugin",
"version": "8.2.2",
"version": "8.2.3",
"description": "cool-admin、cool-uni builder",
"types": "./dist/index.d.ts",
"main": "/dist/index.js",

View File

@ -11,21 +11,6 @@ import {
isTailwindClass,
} 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) => {
if (node.startsWith("<!--")) {
return;
}
let _node = node;
// 兼容 <input /> 标签