generated from PWAPilipinas/appkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.js
37 lines (33 loc) · 942 Bytes
/
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
import tsc from 'rollup-plugin-tsc';
import copy from 'rollup-plugin-copy';
import { nodeResolve } from '@rollup/plugin-node-resolve';
import { terser } from 'rollup-plugin-terser';
import minifyHTML from 'rollup-plugin-minify-html-literals';
const copyConfig = {
targets: [
{ src: 'src/assets', dest: 'dist' },
{ src: 'src/index.html', dest: 'dist' },
{ src: 'src/manfest.webmanifest', dest: 'dist' },
{ src: 'src/styles.css', dest: 'dist' },
{ src: 'src/favicon.ico', dest: 'dist' }
],
};
const config = {
input: 'src/main.ts',
output: {
dir: 'dist',
format: 'es'
},
plugins: [
// copyAndWatch('src/index.html', 'index.html'),
minifyHTML(),
copy(copyConfig),
tsc(),
nodeResolve()
],
preserveEntrySignatures: false
};
if (process.env.NODE_ENV !== 'development') {
config.plugins.push(terser());
}
export default config;