forked from Comcast/react-data-grid
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathrolldown.config.ts
More file actions
31 lines (29 loc) · 833 Bytes
/
rolldown.config.ts
File metadata and controls
31 lines (29 loc) · 833 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
import { isAbsolute } from 'node:path';
import wyw from '@wyw-in-js/rollup';
import { defineConfig } from 'rolldown';
import { dts } from 'rolldown-plugin-dts';
import pkg from './package.json' with { type: 'json' };
export default defineConfig({
input: './src/index.ts',
output: {
dir: 'lib',
cssEntryFileNames: 'styles.css',
sourcemap: true
},
platform: 'browser',
external: (id) => !id.startsWith('.') && !isAbsolute(id),
plugins: [
dts({
tsconfig: './tsconfig.lib.json'
}),
wyw({
exclude: ['**/*.d.ts'],
preprocessor: 'none',
classNameSlug(hash) {
// We add the package version as suffix to avoid style conflicts
// between multiple versions of RDG on the same page.
return `${hash}${pkg.version.replaceAll('.', '-')}`;
}
})
]
});