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

Adding a js file that is not script.js #77

Open ivanakcheurov opened 1 year ago

ivanakcheurov commented 1 year ago

I have created a basic HTML/CSS/JS codeswing. My index.html imports modelHandler.js. But codeswing only recongnizes script.js as a JS file but ignores modelHandler.js. How can I add modelHandler.js to the swing so that it is treated as part of the swing? (open the editor of this file when swing opens, refresh the preview on editing the file, etc.)

<script type="module">
    import { modelHandler } from "./src/modelHandler.js";
    window.modelHandler = new modelHandler();
</script>