-
-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lots of work being done but hard to understand #22
Comments
just found this - https://github.com/aduh95/viz.js-playground |
so.. I am almost there - I replaced viz.js with @adhum95/viz.js in graphql-voyager. I am getting a webpack error (I HATE WEBPACK!)
|
I looks like your webpack doesn't know about class properties... It was added to the language quite recently (ES2022), so if you update your dependencies the issue go away. If not, you may need to tweak your Babel configuration to force it to transpile class fields (i.e. to add |
Morning Antoine, thank you for your feedback. I created a new branch called webpack5 https://github.com/orefalo/graphql-voyager/tree/webpack5
I then changed the get-viz.js-worker.js to a .ts and I got this error:
I left the branch in this latest state because I believe I am getting closer to the Grail ;-) If I could leverage your expertise one more time, viz.js is instantiated in this file → https://github.com/orefalo/graphql-voyager/blob/webpack5/src/graph/svg-renderer.ts Pulling my hairs on these over complex webpack configurations. Thank you |
I got it to...
anu idea why this stupid webpack/babel pair doesn't find the files (they are on the disk by the way...) |
Maybe try
So my package is defining a
More info on this can be found in Node.js docs: https://nodejs.org/api/packages.html#exports To fix this, you should get away with changing those two imports: https://github.com/orefalo/graphql-voyager/blob/f1caf42b08ffa25d8d76bd21a3ba7225471000e7/src/graph/get-viz.js-worker.js#L1-L2 With: import loadWASM from '@aduh95/viz.js/worker';
import wasmLocation from '@aduh95/viz.js/wasm'; Let me know if that fixed it for you. |
ok - so I tried for many hours and it didn't compile. |
Well, first and foremost, Thank you!
I can see by the number of commits that you have put major work in this project.
Trying to find a simple webpack example is far from trivial -
the implementation is spread in comments across the code/documentation.
Anyway, you could open my eyes?
Thank you so much
The text was updated successfully, but these errors were encountered: