-
Notifications
You must be signed in to change notification settings - Fork 20
/
rollup.config.mjs
40 lines (39 loc) · 999 Bytes
/
rollup.config.mjs
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
40
import json from "@rollup/plugin-json";
import multiInput from "rollup-plugin-multi-input";
import commonjs from "@rollup/plugin-commonjs";
import { terser } from "rollup-plugin-terser";
// import { wasm } from '@rollup/plugin-wasm';
// import pkg from './package.json';
export default async function () {
return [
{
plugins: [
multiInput(),
json(),
// terser(),
commonjs(),
// Temporarily disabled, not sure if required
// since rify is a node module doesnt seem to work
// but would be nice to try embed it
// wasm({
// sync: ['*.wasm'],
// }),
],
input: ["src/**/*.js"],
output: [
{
sourcemap: true,
dir: "dist/esm",
format: "esm",
entryFileNames: "[name].js",
},
{
sourcemap: true,
dir: "dist/cjs",
format: "cjs",
entryFileNames: "[name].cjs",
},
],
},
];
}