Skip to content
This repository was archived by the owner on Sep 25, 2024. It is now read-only.

Commit ffe468d

Browse files
committed
feat(compiler): add cssmodulesOptions to compiler params
This commit introduces a new parameter, cssmodulesOptions, to the compiler function in tests/compiler.ts. This allows for more flexible configuration of the cssModules function during testing.
1 parent 5120745 commit ffe468d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/compiler.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,20 @@ import { cssModules } from '../src';
44
type Params = {
55
source: string;
66
preprocessOptions: Parameters<typeof preprocess>[2];
7+
cssmodulesOptions?: Parameters<typeof cssModules>[0];
78
};
89

910
export async function compiler({
1011
source,
1112
preprocessOptions,
13+
cssmodulesOptions,
1214
}: Params) {
1315
const { code } = await preprocess(
1416
source,
1517
[cssModules({
1618
moduleNameingPattern: '[local]_[name]-css-module-test',
1719
includeOriginalPath: false,
20+
...cssmodulesOptions,
1821
})],
1922
preprocessOptions,
2023
);

0 commit comments

Comments
 (0)