@@ -3,49 +3,56 @@ import copy from 'rollup-plugin-copy'
3
3
import { createSpaConfig } from '@open-wc/building-rollup'
4
4
import replace from '@rollup/plugin-replace'
5
5
6
-
7
6
const API_URL = ( process . env . API_URL === undefined )
8
7
? ''
9
8
: process . env . API_URL
10
9
11
-
12
10
const BASE_DIR = ( process . env . BASE_DIR === undefined )
13
11
? ''
14
12
: process . env . BASE_DIR
15
13
16
-
17
14
const baseConfig = createSpaConfig ( {
18
15
developmentMode : process . env . ROLLUP_WATCH === 'true' ,
19
16
injectServiceWorker : true ,
20
17
workbox : {
21
- navigateFallbackDenylist : [ / ^ \/ a p i .* / ] ,
18
+ navigateFallbackDenylist : [ / ^ \/ a p i .* / ]
22
19
} ,
23
20
html : {
24
21
transform : [
25
22
( html ) =>
26
23
html . replace (
27
24
'<base href="/">' ,
28
25
`<base href="${ BASE_DIR } /">`
29
- ) ,
30
- ] ,
31
- } ,
26
+ )
27
+ ]
28
+ }
32
29
} )
33
30
34
-
35
-
36
31
export default merge ( baseConfig , {
37
32
input : './index.html' ,
38
33
plugins : [
39
34
copy ( {
40
35
targets : [
41
36
{ src : './leaflet.css' , dest : 'dist/' } ,
42
37
{ src : './manifest.json' , dest : 'dist/' } ,
43
- { src : './images/**/*' , dest : 'dist/images' }
38
+ { src : './images/**/*' , dest : 'dist/images' } ,
39
+ {
40
+ src : 'node_modules/@hpcc-js/wasm/dist/graphvizlib.wasm' ,
41
+ dest : 'dist/'
42
+ } ,
43
+ {
44
+ src : 'node_modules/@hpcc-js/wasm/dist/graphvizlib.wasm' ,
45
+ dest : 'dist/@hpcc-js/wasm'
46
+ } ,
47
+ {
48
+ src : 'node_modules/@hpcc-js/wasm/dist/index.min.js' ,
49
+ dest : 'dist/@hpcc-js/wasm'
50
+ }
44
51
]
45
52
} ) ,
46
53
replace ( {
47
54
'http://localhost:5555' : API_URL ,
48
- ' BASE_DIR' : JSON . stringify ( BASE_DIR ) ,
55
+ BASE_DIR : JSON . stringify ( BASE_DIR ) ,
49
56
preventAssignment : true
50
57
} )
51
58
]
0 commit comments