lostintangent / codeswing

VS Code extension for building web applications ("swings") using a interactive and editor-integrated coding environment
https://aka.ms/codeswing
MIT License
977 stars 46 forks source link

Importing react component from gist file #45

Closed Sheraff closed 3 years ago

Sheraff commented 3 years ago

With the codeswing.json setting "scriptType": "module", we can easily import a JS module from another one. For example:

|- charsets.js
|- script.mjs
|- index.html
|- style.css
// script.mjs
import { test } from './charsets.js'

In the same vein, I'd love to be able to import a react component from a .jsx file

|- MyComponent.jsx
|- App.jsx
// App.jsx
import MyComponent from './MyComponent.jsx'
lostintangent commented 3 years ago

Hey! I actually implemented this recently, and just need to ship it 😎

lostintangent commented 3 years ago

This has now been shipped!