wangzhibo
6 天以前 7bd866831780abcf5a59c4cbb7d1be456eea7c99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
interface PostcssRemToRpxOptions {
    remUnit?: number;
    remPrecision?: number;
    rpxRatio?: number;
}
interface TailwindTransformOptions extends PostcssRemToRpxOptions {
}
/**
 * Vite 插件:自动转换 .uvue 文件中的 Tailwind 类名为安全字符
 * 并自动注入 rem 转 rpx 的 PostCSS 插件
 * @param options 配置项
 * @returns Vite 插件对象
 */
export declare function tailwindTransformPlugin(options?: TailwindTransformOptions): {
    name: string;
    enforce: "pre";
    config(): {
        css: {
            postcss: {
                plugins: {
                    postcssPlugin: string;
                    prepare(): {
                        Rule(rule: any): void;
                        Declaration(decl: any): void;
                    };
                }[];
            };
        };
    };
    transform(code: string, id: string): {
        code: string;
        map: {
            mappings: string;
        };
    } | null;
};
/**
 * uniappX 入口,自动注入 Tailwind 类名转换插件
 * @param options 配置项
 * @returns Vite 插件数组
 */
export declare function uniappX(options?: {
    tailwind?: TailwindTransformOptions;
}): {
    name: string;
    enforce: "pre";
    config(): {
        css: {
            postcss: {
                plugins: {
                    postcssPlugin: string;
                    prepare(): {
                        Rule(rule: any): void;
                        Declaration(decl: any): void;
                    };
                }[];
            };
        };
    };
    transform(code: string, id: string): {
        code: string;
        map: {
            mappings: string;
        };
    } | null;
}[];
export {};