Skip to content

Commit 80ea2a2

Browse files
committed
Process css in test env
1 parent 9eee5c1 commit 80ea2a2

1 file changed

Lines changed: 16 additions & 15 deletions

File tree

tsup.base.config.ts

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,19 @@ const disablePlugin = (pluginName: string): Plugin => ({
1919
}
2020
});
2121

22+
const cssPlugin = lightningCssPlugin({
23+
include: [/\.module\.css$/u],
24+
options: {
25+
cssModules: {
26+
pattern: 'w[hash]_[local]',
27+
pure: true,
28+
animation: false,
29+
grid: false,
30+
customIdents: false
31+
}
32+
}
33+
});
34+
2235
const baseConfig: Options & { target: Target[] } = {
2336
dts: true,
2437
env: {
@@ -68,22 +81,10 @@ const baseConfig: Options & { target: Target[] } = {
6881
loader: 'tsx',
6982
name: 'babel-plugin-istanbul:tsx',
7083
predicate: istanbulPredicate
71-
})
84+
}),
85+
cssPlugin
7286
]
73-
: [
74-
lightningCssPlugin({
75-
include: [/\.module\.css$/u],
76-
options: {
77-
cssModules: {
78-
pattern: 'w[hash]_[local]',
79-
pure: true,
80-
animation: false,
81-
grid: false,
82-
customIdents: false
83-
}
84-
}
85-
})
86-
],
87+
: [cssPlugin],
8788
format: 'esm',
8889
loader: { '.js': 'jsx' },
8990
metafile: true,

0 commit comments

Comments
 (0)