forked from mlc-ai/web-llm
-
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) · 770 Bytes
/
rollup.config.js
File metadata and controls
29 lines (28 loc) · 770 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 { nodeResolve } from '@rollup/plugin-node-resolve';
import ignore from "rollup-plugin-ignore";
import commonjs from '@rollup/plugin-commonjs';
import typescript from 'rollup-plugin-typescript2'
export default {
input: 'src/index.ts',
output: [
{
file: 'lib/index.js',
exports: 'named',
format: 'es',
sourcemap: true,
globals: {'ws': 'ws',
'perf_hooks': 'perf_hooks'}
}
],
plugins: [
ignore(["fs", "path", "crypto"]),
nodeResolve({ browser: true }),
commonjs({
ignoreDynamicRequires: true,
}),
typescript({
rollupCommonJSResolveHack: false,
clean: true
})
]
};