-
Notifications
You must be signed in to change notification settings - Fork 4
/
rollup.config.js
39 lines (36 loc) · 1.04 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
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import sourcemaps from 'rollup-plugin-sourcemaps';
import postcss from 'rollup-plugin-postcss';
import svelte from 'rollup-plugin-svelte';
export default {
input: 'index.js',
output: {
file: 'dist/index.js',
format: 'umd',
// sourcemap: 'inline',
sourcemap: true,
name: 'XYZSpaceInvader'
},
plugins: [
sourcemaps(),
resolve(),
commonjs(),
postcss({
plugins: []
}),
svelte({
// By default, all .svelte and .html files are compiled
extensions: ['.svelte'],
// Emit CSS as "files" for other plugins to process
// emitCss: true,
// Extract CSS into a separate file (recommended).
// See note below
css: function (css) {
// creates `main.css` and `main.css.map` — pass `false`
// as the second argument if you don't want the sourcemap
css.write('dist/index.css');
},
})
]
};