-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config.js
49 lines (47 loc) · 1.49 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
41
42
43
44
45
46
47
48
49
import json from '@rollup/plugin-json';
import terser from '@rollup/plugin-terser';
import scss from 'rollup-plugin-scss';
import resolve from '@rollup/plugin-node-resolve';
import del from 'rollup-plugin-delete';
import summary from 'rollup-plugin-summary';
import livereload from 'rollup-plugin-livereload'
import url from '@rollup/plugin-url';
import copy from 'rollup-plugin-copy';
import { rollupPluginHTML as html } from '@web/rollup-plugin-html';
export default [
{
input: 'src/client/main.js',
preserveEntrySignatures: 'strict',
output: [
{
dir: 'src/public',
name: 'version',
assetFileNames: 'assets/[name]-[hash][extname]',
plugins: [], //terser()
}
],
watch: {
include: ['src/client/**']
},
plugins: [
resolve(),
json(),
html({
input: 'src/client/index.html',
minify: true,
extractAssets: false
}),
summary(),
url({
include: ['**/*.woff', '**/*.woff2', '**/*.ttf'],
limit: Infinity,
fileName: '[dirname][name][extname]',
}),
copy({targets: [{src: 'src/client/assets', dest: 'src/public'}]}),
del({ targets: 'src/public/assets/*' }),
scss({
fileName: 'bundle.css',
sourceMap: true
})]
}
];