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

Allow importing from arbitrary npm packages for better demos #32

Open
NullVoxPopuli opened this issue Apr 24, 2021 · 3 comments · May be fixed by #1881 or #1805
Open

Allow importing from arbitrary npm packages for better demos #32

NullVoxPopuli opened this issue Apr 24, 2021 · 3 comments · May be fixed by #1881 or #1805
Labels

Comments

@NullVoxPopuli
Copy link
Owner

NullVoxPopuli commented Apr 24, 2021

I had wanted to use Limber for showcasing https://github.com/NullVoxPopuli/ember-statechart-component/, because the story here is really slick with template imports -- but xstate (and ember-statechart-component) are not included in the Limber build.

It'd be great if you could import from 'x' and have x added to your page at runtime, kinda like what https://runkit.com/ does for node packages

How this might look (but with gjs live instead of just gjs)

@NullVoxPopuli
Copy link
Owner Author

NullVoxPopuli commented Jun 12, 2021

example:
this should be able to work: import { toBlob } from 'html-to-image'
Also, importing components from from the app should be doable as well

@NullVoxPopuli
Copy link
Owner Author

NullVoxPopuli commented Jun 11, 2024

In case browsers don't support script[type=module] properly, or import maps: https://github.com/guybedford/es-module-shims

For re-writing imports in scripts without jscodeshift or silly regex: https://github.com/guybedford/es-module-lexer

Example of dynamic updating of the import-map: https://github.com/huozhi/devjar/blob/main/lib/module.js

@NullVoxPopuli
Copy link
Owner Author

Allowing service worker composition: https://mswjs.io/docs/recipes/merging-service-workers/

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