-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Expand file tree
/
Copy pathtsdown.config.ts
More file actions
33 lines (31 loc) · 851 Bytes
/
tsdown.config.ts
File metadata and controls
33 lines (31 loc) · 851 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import { ecij } from 'ecij/plugin';
import { Features } from 'lightningcss';
import { defineConfig } from 'tsdown';
import pkg from './package.json' with { type: 'json' };
export default defineConfig({
outDir: 'lib',
target: ['baseline-widely-available', 'node24.0.0'],
platform: 'neutral',
sourcemap: true,
deps: {
skipNodeModulesBundle: true
},
css: {
fileName: 'styles.css',
lightningcss: {
// https://github.com/parcel-bundler/lightningcss/issues/873
exclude: Features.Nesting | Features.LightDark
}
},
dts: {
build: true,
tsconfig: './tsconfig.src.json'
},
plugins: [
ecij({
// We add the package version as prefix to avoid style conflicts
// between multiple versions of RDG on the same page
classPrefix: `rdg-${pkg.version.replaceAll('.', '-')}-`
})
]
});