-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config.js
35 lines (34 loc) · 1 KB
/
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
import { nodeResolve } from '@rollup/plugin-node-resolve';
import terser from '@rollup/plugin-terser';
import commonjs from '@rollup/plugin-commonjs';
import replace from '@rollup/plugin-replace';
import typescript from '@rollup/plugin-typescript';
export default [
{
plugins: [
nodeResolve({ browser: true, preferBuiltins: false }),
commonjs({
include: /node_modules/,
}),
typescript({ compilerOptions: { module: 'ES6' } }),
replace({
preventAssignment: true,
'process.env.NODE_ENV': JSON.stringify('development'),
}),
terser({
format: {
comments: false,
},
}),
],
input: 'src/hydrate.tsx',
output: [
{
inlineDynamicImports: true,
sourcemap: true,
format: 'esm',
file: 'eik/esm.js',
},
],
},
];