-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathrollup.config.js
More file actions
25 lines (24 loc) · 854 Bytes
/
rollup.config.js
File metadata and controls
25 lines (24 loc) · 854 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
import resolve from '@rollup/plugin-node-resolve'
import json from '@rollup/plugin-json'
import { babel } from '@rollup/plugin-babel'
export default [
{
input: 'src/server.js',
output: {
file: 'build/server.js',
format: 'cjs',
watch: 'src/**/**/*'
},
plugins: [resolve(), json(), babel({ babelHelpers: 'bundled', plugins: [['@babel/plugin-transform-react-jsx', { pragma: 'h', pragmaFrag: 'Fragment' }]] })],
},
{
input: 'src/client.js',
output: {
file: 'public/client.js',
format: 'es',
name: 'client',
watch: 'src/**/**/*'
},
plugins: [resolve(), json(), babel({ babelHelpers: 'bundled', plugins: [['@babel/plugin-transform-react-jsx', { pragma: 'h', pragmaFrag: 'Fragment' }]] })],
},
]