-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathrollup.config.js
56 lines (55 loc) · 1.41 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/**
* # Sample Rollup for Fabric
*/
import babel from '@rollup/plugin-babel';
import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import replace from '@rollup/plugin-replace';
import css from 'rollup-plugin-import-css';
import json from '@rollup/plugin-json';
import url from '@rollup/plugin-url';
// import serve from 'rollup-plugin-serve';
// import livereload from 'rollup-plugin-livereload';
export default [
{
input: 'components/Feed.js',
output: [
{
file: 'assets/feed.js',
format: 'iife',
name: 'PortalFeed'
}
],
plugins: [
resolve({
extensions: ['.js']
}),
replace({
preventAssignment: true,
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'development')
}),
css(),
json(),
url(),
babel({
presets: ['@babel/preset-react'],
babelHelpers: 'runtime',
skipPreflightCheck: true,
exclude: '**/node_modules/**',
}),
commonjs(),
/* serve({
open: true,
contentBase: ['', 'assets'],
host: 'localhost',
port: 3000
}) */,
// livereload({ watch: 'components' })
],
onwarn(warning, warn) {
const { code, importer } = warning;
if (code === "CIRCULAR_DEPENDENCY" && importer.includes("semantic-ui-react")) return;
warn(warning);
},
}
];