-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
Feature: Allow use of modules with imports outside of livecodes #441
Comments
custom specifiers e.g. These are enabled in LiveCodes for convenience. However, if you use that in a LiveCodes project and export it (e.g. to HTML file), it should still work. something like this is added to the page: <script type="importmap">
{ "imports": {
"skypack:uuid": "https://cdn.skypack.dev/uuid"
}
}
</script> This even works if you export to CodePen. The full URL is used in the import. Module resolution in LiveCodes is described here: https://livecodes.io/docs/features/module-resolution What are you trying to achieve that is not working? Can you share an Example? |
In my suggestion here #443 I tried to give a more concrete idea for solving some pain point of introducing import maps and integrating them into other work/deployments - such that these conveniences can be used during development easily and flexibly exported in the current ways LiveCodes supports + in a "fully baked" output I propose that would render Ideally code written for/in LiveCodes could be more easily used in other contexts, which currently means not using the import map conveniences (or adopting the import maps into the rest of the prod deployment). Perhaps there's a way to have an output option where for example it defines an NPM-compatible package with the dependencies defined such that other tools know how to pull them. But as an alternative to this approach, I wrote the above idea |
Type of feature
✨ Feature
Current behavior
No response
Suggested feature
livecodes has useful import features such as skypack: and jsdeliver.gh: prefixes. However these are only runnable inside of livecodes, it seems. It would be great to have a way to reuse these files in other build systems, I'm not familiar enough with JS to know how to make this "cross-platform"
Additional context
No response
Code of Conduct
Contributing Docs
The text was updated successfully, but these errors were encountered: