-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrollup.config.js
More file actions
29 lines (28 loc) · 765 Bytes
/
rollup.config.js
File metadata and controls
29 lines (28 loc) · 765 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
import typescript from "rollup-plugin-ts";
import nodeResolve from "rollup-plugin-node-resolve";
import pkg from "./package.json";
export default {
input: "src/main.ts",
output: [
// check output formats https://rollupjs.org/guide/en/
// commonjs for node
{
file: pkg.main,
format: "cjs"
},
// iife, browser bundle to be included via <script> tag
{
file: pkg.browser,
format: "iife",
name: "ShapediverViewerSettings"
},
// umd, suitable for browser and node
{
file: pkg.umd,
format: "umd",
name: "ShapediverViewerSettings"
}
],
external: [...Object.keys(pkg.dependencies || {}), ...Object.keys(pkg.peerDependencies || {})],
plugins: [nodeResolve(), typescript()]
};