@dcloudio/uni-cli-shared 3.0.0-alpha-3021320211119002 → 3.0.0-alpha-3021320211123002

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,67 @@
1
+ import { Plugin } from '../plugin';
2
+ import { ResolvedConfig } from '../config';
3
+ import { RenderedChunk, RollupError } from 'rollup';
4
+ import { ResolveFn } from '../';
5
+ import * as Postcss from 'postcss';
6
+ export interface CSSOptions {
7
+ /**
8
+ * https://github.com/css-modules/postcss-modules
9
+ */
10
+ modules?: CSSModulesOptions | false;
11
+ preprocessorOptions?: Record<string, any>;
12
+ postcss?: string | (Postcss.ProcessOptions & {
13
+ plugins?: Postcss.Plugin[];
14
+ });
15
+ }
16
+ export interface CSSModulesOptions {
17
+ getJSON?: (cssFileName: string, json: Record<string, string>, outputFileName: string) => void;
18
+ scopeBehaviour?: 'global' | 'local';
19
+ globalModulePaths?: RegExp[];
20
+ generateScopedName?: string | ((name: string, filename: string, css: string) => string);
21
+ hashPrefix?: string;
22
+ /**
23
+ * default: null
24
+ */
25
+ localsConvention?: 'camelCase' | 'camelCaseOnly' | 'dashes' | 'dashesOnly' | null;
26
+ }
27
+ export declare const isCSSRequest: (request: string) => boolean;
28
+ export declare const isDirectCSSRequest: (request: string) => boolean;
29
+ export declare const isDirectRequest: (request: string) => boolean;
30
+ export declare const chunkToEmittedCssFileMap: WeakMap<RenderedChunk, Set<string>>;
31
+ export declare const removedPureCssFilesCache: WeakMap<Readonly<Omit<import("vite").UserConfig, "plugins" | "alias" | "dedupe" | "assetsInclude" | "optimizeDeps"> & {
32
+ configFile: string | undefined;
33
+ configFileDependencies: string[];
34
+ inlineConfig: import("vite").InlineConfig;
35
+ root: string;
36
+ base: string;
37
+ publicDir: string;
38
+ command: "build" | "serve";
39
+ mode: string;
40
+ isProduction: boolean;
41
+ env: Record<string, any>;
42
+ resolve: import("vite").ResolveOptions & {
43
+ alias: import("vite").Alias[];
44
+ };
45
+ plugins: readonly Plugin[];
46
+ server: import("vite").ResolvedServerOptions;
47
+ build: Required<Omit<import("vite").BuildOptions, "base" | "cleanCssOptions" | "polyfillDynamicImport" | "brotliSize">>;
48
+ assetsInclude: (file: string) => boolean;
49
+ logger: import("vite").Logger;
50
+ createResolver: (options?: Partial<import("vite").InternalResolveOptions> | undefined) => ResolveFn;
51
+ optimizeDeps: Omit<import("vite").DepOptimizationOptions, "keepNames">;
52
+ }>, Map<string, RenderedChunk>>;
53
+ /**
54
+ * Plugin applied before user plugins
55
+ */
56
+ export declare function cssPlugin(config: ResolvedConfig): Plugin;
57
+ /**
58
+ * Plugin applied after user plugins
59
+ */
60
+ export declare function cssPostPlugin(config: ResolvedConfig): Plugin;
61
+ export declare const cssUrlRE: RegExp;
62
+ export interface StylePreprocessorResults {
63
+ code: string;
64
+ map?: object;
65
+ errors: RollupError[];
66
+ deps: string[];
67
+ }