Skip to content
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

How can I use it locally ? #127

Open
FlashTang opened this issue Jan 13, 2024 · 1 comment
Open

How can I use it locally ? #127

FlashTang opened this issue Jan 13, 2024 · 1 comment

Comments

@FlashTang
Copy link

Hi
I just converted svgjs.d.ts successfully
but the generated extern use require
So I can't use it directly, I have to write
untyped Browser.window["svgdotjs_svg_$js_svgdotjs_SvgJs"] = untyped SVG;
and then delete require from output js to be able to run on the browser locally
like so :
Screen Shot 2024-01-14 at 02 38 15
Screen Shot 2024-01-14 at 02 38 30
My question is how to config the dts2hx so it can be used locally

@FlashTang
Copy link
Author

I just converted js with esbuild , it found svg.esm.js from node_modules then packed it in the bundle,
seems it works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant