-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrollup.config.js
More file actions
36 lines (34 loc) · 775 Bytes
/
rollup.config.js
File metadata and controls
36 lines (34 loc) · 775 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
30
31
32
33
34
35
36
import resolve from '@rollup/plugin-node-resolve';
import babel from '@rollup/plugin-babel';
import terser from '@rollup/plugin-terser';
import serve from 'rollup-plugin-serve';
const dev = process.env.ROLLUP_WATCH;
export default {
input: 'src/index.js',
output: {
file: 'dist/ember-mug-card.js',
format: 'es',
sourcemap: dev ? true : false
},
plugins: [
resolve(),
babel({
babelHelpers: 'bundled',
exclude: 'node_modules/**'
}),
!dev && terser({
format: {
comments: false
}
}),
dev && serve({
contentBase: ['dist'],
host: '0.0.0.0',
port: 5000,
allowCrossOrigin: true,
headers: {
'Access-Control-Allow-Origin': '*',
},
}),
].filter(Boolean),
};