forked from iamdustan/smoothscroll
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathrollup.config.js
39 lines (37 loc) · 996 Bytes
/
rollup.config.js
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 { terser } from "rollup-plugin-terser";
import typescript from "rollup-plugin-typescript2";
/** @type {import('rollup').RollupOptions} */
const rollupOptions = {
input: "src/index.ts",
plugins: typescript({
useTsconfigDeclarationDir: true,
tsconfigOverride: {
compilerOptions: {
target: "es5",
importHelpers: true,
},
},
}),
output: [
{
file: "lib/index.cjs",
format: "cjs",
sourcemap: true,
},
{
file: "lib/bundle.umd.cjs",
name: "seamless",
format: "umd",
sourcemap: true,
},
{
file: "lib/browser.min.js",
name: "seamless",
format: "iife",
sourcemap: true,
plugins: [terser()],
footer: `if(typeof module==="object")module.exports=seamless;`,
},
],
};
export default rollupOptions;