1 | import buble from 'rollup-plugin-buble';
|
2 | import resolve from 'rollup-plugin-node-resolve';
|
3 | import commonjs from 'rollup-plugin-commonjs';
|
4 | import liveReload from 'rollup-plugin-livereload';
|
5 | import serve from 'rollup-plugin-serve';
|
6 | import uglify from 'rollup-plugin-uglify';
|
7 | import string from 'rollup-plugin-string';
|
8 |
|
9 | const PORT = 8080;
|
10 | console.log(`open http://localhost:${PORT}/`);
|
11 |
|
12 | export default {
|
13 | entry: 'index.js',
|
14 | sourceMap: true,
|
15 | targets: [
|
16 | {
|
17 | format: 'umd',
|
18 | moduleName: 'dl',
|
19 | dest: `dist/template.js`,
|
20 | }
|
21 | ],
|
22 | plugins: [
|
23 | resolve({
|
24 | jsnext: true,
|
25 | browser: true,
|
26 | }),
|
27 | string({
|
28 | include: ["**/*.svg", "**/*.html", "**/*.css", "**/*.base64"]
|
29 | }),
|
30 | buble({
|
31 | exclude: 'node_modules',
|
32 | target: { chrome: 52, safari: 8, edge: 13, firefox: 48, }
|
33 | }),
|
34 | commonjs(),
|
35 |
|
36 |
|
37 | serve({port: PORT}),
|
38 | ]
|
39 | };
|