Closed Sheraff closed 3 years ago
With the codeswing.json setting "scriptType": "module", we can easily import a JS module from another one. For example:
"scriptType": "module"
|- 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'
Hey! I actually implemented this recently, and just need to ship it 😎
This has now been shipped!
With the codeswing.json setting
"scriptType": "module"
, we can easily import a JS module from another one. For example:In the same vein, I'd love to be able to import a react component from a .jsx file