-
Notifications
You must be signed in to change notification settings - Fork 131
Expand file tree
/
Copy pathrollup.css.config.mjs
More file actions
37 lines (34 loc) · 978 Bytes
/
rollup.css.config.mjs
File metadata and controls
37 lines (34 loc) · 978 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
34
35
36
37
import { createRequire } from 'node:module'
import postcss from 'rollup-plugin-postcss'
import rollupTypescript from 'rollup-plugin-typescript2'
const cjsRequire = createRequire(import.meta.url)
const tspCompiler = cjsRequire('ts-patch/compiler')
// CSS-only build: processes TypeScript to extract CSS
export default {
input: 'src/css-entry.ts',
output: {
dir: 'dist',
format: 'es',
// Minimal JS output - just a placeholder since we only care about CSS
entryFileNames: () => 'harmony.css.placeholder.js',
sourcemap: false
},
plugins: [
rollupTypescript({
typescript: tspCompiler,
clean: false,
useTsconfigDeclarationDir: false,
// Skip type checking to speed up
check: false
}),
postcss({
minimize: true,
extract: 'harmony.css',
modules: true,
inject: false
})
],
// External everything since we only care about CSS extraction
external: () => true,
treeshake: false
}