Skip to content

Commit bd55741

Browse files
committed
Try deploying graphviz wasm
1 parent e652c2f commit bd55741

File tree

3 files changed

+21
-14
lines changed

3 files changed

+21
-14
lines changed

graphvizlib.wasm

892 KB
Binary file not shown.

rollup.config.js

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,49 +3,56 @@ import copy from 'rollup-plugin-copy'
33
import {createSpaConfig} from '@open-wc/building-rollup'
44
import replace from '@rollup/plugin-replace'
55

6-
76
const API_URL = (process.env.API_URL === undefined)
87
? ''
98
: process.env.API_URL
109

11-
1210
const BASE_DIR = (process.env.BASE_DIR === undefined)
1311
? ''
1412
: process.env.BASE_DIR
1513

16-
1714
const baseConfig = createSpaConfig({
1815
developmentMode: process.env.ROLLUP_WATCH === 'true',
1916
injectServiceWorker: true,
2017
workbox: {
21-
navigateFallbackDenylist: [/^\/api.*/],
18+
navigateFallbackDenylist: [/^\/api.*/]
2219
},
2320
html: {
2421
transform: [
2522
(html) =>
2623
html.replace(
2724
'<base href="/">',
2825
`<base href="${BASE_DIR}/">`
29-
),
30-
],
31-
},
26+
)
27+
]
28+
}
3229
})
3330

34-
35-
3631
export default merge(baseConfig, {
3732
input: './index.html',
3833
plugins: [
3934
copy({
4035
targets: [
4136
{src: './leaflet.css', dest: 'dist/'},
4237
{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+
}
4451
]
4552
}),
4653
replace({
4754
'http://localhost:5555': API_URL,
48-
'BASE_DIR': JSON.stringify(BASE_DIR),
55+
BASE_DIR: JSON.stringify(BASE_DIR),
4956
preventAssignment: true
5057
})
5158
]

src/views/GrampsjsView.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ export class GrampsjsView extends LitElement {
2121
]
2222
}
2323

24-
// shouldUpdate() {
25-
// return this.active;
26-
// }
24+
shouldUpdate() {
25+
return this.active
26+
}
2727

2828
static get properties() {
2929
return {

0 commit comments

Comments
 (0)