-
Notifications
You must be signed in to change notification settings - Fork 3
/
rollup.config.dev.js
43 lines (38 loc) · 1.34 KB
/
rollup.config.dev.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
import fs from 'fs-extra';
fs.ensureDirSync('./public/js');
fs.emptyDirSync('./public/js');
fs.ensureDirSync('./public/libs');
fs.emptyDirSync('./public/libs');
fs.ensureDirSync('./public/libs/webcomponentsjs');
const filesToCopy = [{
from: './node_modules/@webcomponents/webcomponentsjs/webcomponents-hi-ce.js',
to: './public/libs/webcomponentsjs/webcomponents-hi-ce.js',
}, {
from: './node_modules/@webcomponents/webcomponentsjs/webcomponents-hi-sd-ce.js',
to: './public/libs/webcomponentsjs/webcomponents-hi-sd-ce.js',
}, {
from: './node_modules/@webcomponents/webcomponentsjs/webcomponents-hi-sd.js',
to: './public/libs/webcomponentsjs/webcomponents-hi-sd.js',
}, {
from: './node_modules/@webcomponents/webcomponentsjs/webcomponents-hi.js',
to: './public/libs/webcomponentsjs/webcomponents-hi.js',
}, {
from: './node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js',
to: './public/libs/webcomponentsjs/webcomponents-loader.js',
}, {
from: './node_modules/@webcomponents/webcomponentsjs/webcomponents-sd-ce.js',
to: './public/libs/webcomponentsjs/webcomponents-sd-ce.js',
}];
filesToCopy.forEach((file) => {
fs.copyFileSync(file.from, file.to);
});
export default {
input: './public/src/components/app.js',
output: {
file: `./public/js/app.js`,
format: 'iife',
sourcemap: true,
},
plugins: [
]
};