forked from basf/metis-gui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.config.js
46 lines (44 loc) · 862 Bytes
/
app.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
const { version: pkgVersion } = require('./package.json');
const LIGHT_MODE = process.argv.includes('--light_mode');
const dev = !!process.env.ROLLUP_WATCH;
const dest = 'dist';
const src = 'src';
const assets = `${src}/assets`;
const version = `${pkgVersion}.${Date.now()}`;
module.exports = {
name: 'app',
input: LIGHT_MODE ? `${src}/light_mode.ts` : `${src}/full_mode.ts`,
template: `${src}/index.html`,
files: [
{ src: 'src/assets/favicon.ico', dest: 'dist' }
],
externals: [],
replace: {
__env: JSON.stringify(dev ? 'development' : 'production'),
__ver: JSON.stringify(version)
},
alias: {
'@': `./${src}`,
'@/*': `./${src}/*`
},
extensions: [
'.js',
'.mjs',
'.ts',
'.svelte',
],
mainFields: [
'browser',
'module',
'main'
],
manifest: {
version,
},
sourceMap: dev,
legacy: false,
assets,
dest,
dev,
src,
};