You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, JS code generated by Ditto include each other with import 'package_name/...'.
need special package.json set up
need bundler like Vite to be used in browser
If possible, it might be better to use relative import everywhere. This will allow the generated code to be used in browsers directly with a dumb HTTP server.
Alternatively, generating a import maps for Deno should be easy, without any modification to JS generated. We need to also specify npm dependency as npm:xxx, and Deno stub for node modules in the import map.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Currently, JS code generated by Ditto include each other with
import 'package_name/...'
.package.json
set upIf possible, it might be better to use relative import everywhere. This will allow the generated code to be used in browsers directly with a dumb HTTP server.
Alternatively, generating a import maps for Deno should be easy, without any modification to JS generated. We need to also specify npm dependency as
npm:xxx
, and Deno stub for node modules in the import map.Also, import map in browser is getting supported: https://caniuse.com/import-maps
Important: About trailing slash in import map: https://github.com/WICG/import-maps#packages-via-trailing-slashes
Beta Was this translation helpful? Give feedback.
All reactions