generated from hecht-a/template-typescript-package
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config.dev.ts
33 lines (32 loc) · 871 Bytes
/
rollup.config.dev.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
import remove from "rollup-plugin-delete";
import {resolve} from "node:path";
import {terser} from "rollup-plugin-terser";
import typescript from "@rollup/plugin-typescript";
import scss from 'rollup-plugin-scss';
import copy from "rollup-plugin-copy";
export default {
input: resolve("src", "index.ts"),
plugins: [
remove({targets: resolve("lib", "*")}),
typescript(),
terser(),
scss({
include: resolve("src", "style.scss"),
output: './lib/style.css'
}),
copy({
targets: [
{src: resolve("src", "style.scss"), dest: 'lib'}
]
}),
copy({
targets: [
{src: resolve("index.html"), dest: 'lib'}
]
})
],
output: {
file: resolve("lib", "index.js"),
format: "cjs"
}
}