Open jpduckwo opened 3 years ago
HI @jpduckwo Were you able to resolve this issue of ?? in vis-js timeline package? I am facing similar issue when using with react? Thanks for your thoughts in advance!
Unfortunately not :( Please let me know if you have any breakthrough
@jpduckwo will do! So did you end up using any work around? How did you compile?
We have to leave the target to es5 and then import as follows
import { Edge, Network, Node, Options } from 'vis-network/peer';
...it compiles. However when we set a higher target it compiles but fails to load at runtime. I was hoping the esnext module was going to help us use a higher target and allow it work still...
Ok, thanks. And is your workaround specific to Angular? Where is this target located? Using react here and I have target in tsconfig.json..
I don’t think it would be Angular specific, yes the target in tsconfig
"target": "es5", "module": "es2020", "lib": [ "es2018", "dom" ],
Thanks for confirming..
ok, makes sense. Thx again
The easiest way to solve this is to switch to the peer
build:
import { DataSet } from 'vis-data/peer';
import { Edge, Network, Node, Options } from 'vis-network/peer';
Hi there, using Angular 11, if you import from the esnext module the application won't compile and fails on the nullish coalescing operator "??" used in the code.
Compile error
My tsconfig... I have also tried to use module: "esnext" and that still throws an error
Versions...
We were using the standalone release before, but we have issues with the following code in there because we use a CSP which totally fails with this... I read that to get around this we need to use the esnext version to remove the compatibility of older browsers we don't need. Just including this for extra info...