| 1 |
import { BuildOptions, OnLoadResult } from 'esbuild'; |
| 2 |
import { AcceptedPlugin } from 'postcss'; |
| 3 |
import PostcssModulesPlugin from 'postcss-modules'; |
| 4 |
import { Syntax } from 'sass'; |
| 5 |
import { SassPluginOptions, Type } from './index'; |
| 6 |
export declare const DEFAULT_FILTER: RegExp; |
| 7 |
export declare const posixRelative: (path: string) => string; |
| 8 |
export declare function modulesPaths(absWorkingDir?: string): string[]; |
| 9 |
export declare function fileSyntax(filename: string): Syntax; |
| 10 |
export type PluginContext = { |
| 11 |
instance: number; |
| 12 |
namespace: string; |
| 13 |
sourcemap: boolean; |
| 14 |
watched: { |
| 15 |
[path: string]: string[]; |
| 16 |
}; |
| 17 |
}; |
| 18 |
export declare function getContext(buildOptions: BuildOptions): PluginContext; |
| 19 |
export declare function sourceMappingURL(sourceMap: any): string; |
| 20 |
export declare function makeModule(contents: string, type: Type, nonce?: string): string; |
| 21 |
export declare function parseNonce(nonce: string | undefined): string | undefined; |
| 22 |
export type PostcssModulesParams = Parameters<PostcssModulesPlugin>[0] & { |
| 23 |
basedir?: string; |
| 24 |
}; |
| 25 |
export declare function postcssModules(options: PostcssModulesParams, plugins?: AcceptedPlugin[]): (source: string, dirname: string, path: string) => Promise<OnLoadResult>; |
| 26 |
export declare function createResolver(options: SassPluginOptions | undefined, loadPaths: string[]): (id: string, basedir: string) => any; |
| 27 |
export declare function safeExport(identifier: string): string; |