Skip to content
Discussion options

You must be logged in to vote

Hey @RenaKunisaki, <script src="..."> is for when you are using library bundles and the like. Assuming that's the route you want to take, you'd probably want to bundle your app.

For your specific use-case you may want to try something like Vite, which would allow you to do <script src="main.ts" type="module"> and move on to the important stuff.

When Vite doesn't fit the use case, my go-to bundler is esbuild. Many others like Webpack and Rollup also work.

Bundling like this is extremely common, so you can easily find plenty of documentation and examples online.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@RenaKunisaki
Comment options

@james-pre
Comment options

@RenaKunisaki
Comment options

@james-pre
Comment options

Answer selected by RenaKunisaki
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants