Skip to content

Use hpcc-js-wasm with client-side React based on create-react-app #103

Answered by GordonSmith
andreash asked this question in Q&A
Discussion options

You must be logged in to vote

In general copying the wasm file to the same location the loader code has been bundled to is probably the simplest approach.
To nominate a different location you can call wasmFolder(...url...) prior to making graphviz calls:


import { wasmFolder } from "@hpcc-js/wasm";

...

wasmFolder("../../node_modules/@hpcc-js/wasm/dist");

type of thing.

You may need to tweak the relative path depending on your root folder and the location of your bundled folder.

Note: GitHub has introduced a new "Discussions" tab above ^^^^^ where these types of questions might be better located!

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by GordonSmith
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
2 participants
Converted from issue

This discussion was converted from issue #40 on April 05, 2022 06:47.