This repository was archived by the owner on Nov 17, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ import path from 'node:path';
16
16
import DtsCreator from 'typed-css-modules' ;
17
17
import find from 'find' ;
18
18
import { defaultImport } from 'default-import' ;
19
- import type { DtsContent } from 'typed-css-modules/lib/dts-content.js' ;
20
19
import { definePlugin } from './plugin-helper.js' ;
21
20
22
21
const files : readonly string [ ] = await new Promise ( ( resolve ) => {
@@ -29,21 +28,11 @@ const newCreator = () =>
29
28
dropExtension : false ,
30
29
outDir : path . join ( 'build' , 'types' ) ,
31
30
namedExports : true ,
31
+ allowArbitraryExtensions : true ,
32
32
} ) ;
33
33
34
34
const writeTypes = async ( file : string , creator = newCreator ( ) ) => {
35
35
const content = await creator . create ( file ) ;
36
-
37
- Object . defineProperty ( content , 'outputFileName' , {
38
- get ( this : DtsContent ) {
39
- // @ts -expect-error DtsContent does not allow us to modify the
40
- // extension, so we need to: redefine a private accessor, and read
41
- // the file path from a private property.
42
- const rInputPath = this . rInputPath as string ;
43
- return rInputPath . replace ( / \. c s s $ / , '' ) + '.d.css.ts' ;
44
- } ,
45
- } ) ;
46
-
47
36
await content . writeFile ( ) ;
48
37
} ;
49
38
You can’t perform that action at this time.
0 commit comments