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

Script modules #1

Open
jasonsturges opened this issue Feb 18, 2024 · 0 comments
Open

Script modules #1

jasonsturges opened this issue Feb 18, 2024 · 0 comments

Comments

@jasonsturges
Copy link

It'd be cool for script injection to support modules.

<script type="module">

CodePen does this to support npm packages via ESM CDN, used as:

import { Scene } from "https://esm.sh/three";

const scene = new Scene();

In App.tsx at:

better-codepen/src/App.tsx

Lines 108 to 110 in 2475805

<script>
${data.isTypeScript ? await getTranspiledJS() : data.js}
</script>

Extremely cool project - this is impressive, and inspiring.

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