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

sweet "on the fly" action #32

Open
chase-moskal opened this issue Sep 14, 2021 · 0 comments
Open

sweet "on the fly" action #32

chase-moskal opened this issue Sep 14, 2021 · 0 comments
Labels
discussion enhancement New feature or request help wanted Extra attention is needed

Comments

@chase-moskal
Copy link
Owner

chase-moskal commented Sep 14, 2021

okay here's my super evil-genius-level idea

<script type=importly src="/package-lock.json"></script>
<script type=module-shim defer src="/my-cool-app.js"></script>

<script defer src="/node_modules/importly/x/on-the-fly.js"></script>
<script defer src="/node_modules/es-module-shims/dist/es-module-shims.js"></script>

and that's it. no build step required!!! 🔥🎸

  • importly would operate 100% inside the browser
  • it would cache the importmap into localStorage, so it only has to generate on the first run
  • it would do a checksum on the package-lock.json, and if it changes: clear the cache!
  • sooooo raaaaaad!!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant