-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.js
40 lines (39 loc) · 1.05 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
// noinspection JSUnusedGlobalSymbols
import copy from 'rollup-plugin-copy'
import resolve from '@rollup/plugin-node-resolve'; // locate and bundle dependencies in node_modules (mandatory)
import svelte from 'rollup-plugin-svelte'
import { sass } from 'svelte-preprocess-sass';
import css from 'rollup-plugin-css-only';
export default {
input: 'src/main.js',
plugins: [
resolve(),
copy({
targets: [
{ src: 'node_modules/web-ifc/web-ifc-mt.wasm', dest: './' },
{ src: 'node_modules/web-ifc/web-ifc.wasm', dest: './' },
{ src: 'node_modules/web-ifc-three/IFCWorker.js', dest: './' },
{ src: 'node_modules/web-ifc-three/IFCWorker.js.map', dest: './' },
]
}),
svelte({
// we'll extract any component CSS out into
// a separate file - better for performance
preprocess: {
style: sass(),
},
emitCss: false,
}),
css({ output: 'bundle.css' }),
resolve({
browser: true,
dedupe: ['svelte']
}),
],
output: [
{
format: 'cjs',
file: 'bundle.js'
},
],
};