File tree Expand file tree Collapse file tree 2 files changed +14
-8
lines changed Expand file tree Collapse file tree 2 files changed +14
-8
lines changed Original file line number Diff line number Diff line change 1
1
import type { Plugin } from 'esbuild' ;
2
2
3
- declare type GenerateScopedNameFunction = (
4
- name : string ,
5
- filename : string ,
6
- css : string
7
- ) => string ;
3
+ declare type GenerateScopedNameFunction = ( name : string , filename : string , css : string ) => string ;
8
4
9
5
declare type LocalsConventionFunction = (
10
6
originalClassName : string ,
11
7
generatedClassName : string ,
12
8
inputFile : string
13
9
) => string ;
14
10
11
+ declare class Loader {
12
+ constructor ( root : string , plugins : Plugin [ ] ) ;
13
+
14
+ fetch ( file : string , relativeTo : string , depTrace : string ) : Promise < { [ key : string ] : string } > ;
15
+
16
+ finalSource ?: string | undefined ;
17
+ }
18
+
15
19
declare interface CssModulesOptions {
16
20
getJSON ?( cssFilename : string , json : { [ name : string ] : string } , outputFilename ?: string ) : void ;
17
21
@@ -44,6 +48,8 @@ declare interface PluginOptions {
44
48
v2 ?: boolean ;
45
49
}
46
50
47
- export default function CssModulesPlugin ( options ?: PluginOptions ) : Plugin ;
51
+ declare function CssModulesPlugin ( options ?: PluginOptions ) : Plugin ;
52
+
53
+ declare namespace CssModulesPlugin { }
48
54
49
- export = CssModulesPlugin ;
55
+ export = CssModulesPlugin ;
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " esbuild-css-modules-plugin" ,
3
- "version" : " 2.1.5 " ,
3
+ "version" : " 2.1.6 " ,
4
4
"description" : " A esbuild plugin to bundle css modules into js(x)/ts(x)." ,
5
5
"main" : " index.js" ,
6
6
"keywords" : [
You can’t perform that action at this time.
0 commit comments