-
Notifications
You must be signed in to change notification settings - Fork 83
/
Copy pathrollup.config.ts
39 lines (38 loc) · 955 Bytes
/
rollup.config.ts
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
38
39
import {defineConfig} from "rollup";
import json from "@rollup/plugin-json";
import scss from "rollup-plugin-scss";
import typescript from "@rollup/plugin-typescript";
import cleanup from "rollup-plugin-cleanup";
export default defineConfig({
output: {
format: "cjs",
exports: "default",
generatedCode: {
constBindings: true,
objectShorthand: true
},
freeze: false
},
plugins: [
json({
namedExports: true,
preferConst: true
}),
scss({
output: false
}),
typescript(),
cleanup({
comments: [/[@#]__PURE__/],
maxEmptyLines: 0,
extensions: ["js", "ts", "tsx"],
sourcemap: false
})
],
treeshake: {
preset: "smallest",
annotations: true,
moduleSideEffects: false,
propertyReadSideEffects: false
}
});