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

make vite the default #2860

Open
laoshaw opened this issue Aug 11, 2023 · 4 comments
Open

make vite the default #2860

laoshaw opened this issue Aug 11, 2023 · 4 comments
Assignees
Labels
Area: Documentation For anything dealing mainly with the documentation itself Type: Enhancement For any feature request or suggestion that isn't a bug fix

Comments

@laoshaw
Copy link

laoshaw commented Aug 11, 2023

I like the fact that mithril now is the only SPA that does not get into the SSR side, which makes it complex for people who are only interested in SPA CSR, however the webpack is a bit "out of date" these days, hope Mithril can make vite the default

Mithril.js version:

Why

vite is faster, smaller and more importantly, easier to use. make it default will likely invite more new users too.

@laoshaw laoshaw added the Type: Enhancement For any feature request or suggestion that isn't a bug fix label Aug 11, 2023
@dead-claudia dead-claudia added the Area: Documentation For anything dealing mainly with the documentation itself label Aug 11, 2023
@panoply
Copy link

panoply commented Aug 11, 2023

ESbuild FTW.

@laoshaw
Copy link
Author

laoshaw commented Aug 11, 2023

what does that mean, learned a little about mithril in the past, do you mean there is a way for esbuild to work with mithril now? Thanks. I want to pick up mithril but webpack is a non-starter for me at this point. the reason to switch from react to mithril is simplicity, and webpack in mithril does not help(react is recommending vite on the build side too, along with pretty much everybody else)

@webketje
Copy link

Vite adds a layer of DX (and a ton of marketing) on top of esbuild that you get the most out of for codebases that produce a visual result (like a site or an app). It only swaps out esbuild's bundling feature for rollup's because it is more full-featured if you want to do all sorts of live-reloadable, hot-module-replaced import preprocessing (eg JSX, MDX, SASS etc)

IMO for a library like mithril.js esbuild CLI/API would be enough.

do you mean there is a way for esbuild to work with mithril now?

Of course, why wouldn't there be?

@idlist
Copy link

idlist commented Dec 13, 2023

Mithril does work with Vite (and esbuild) if you are writing .js or .ts, but for .jsx or .tsx, custom JSX transform needs to be set (see #2675, and I believe esbuild did not remove the feature in these years).

Though personally I agree that you might want to avoid using .tsx (either .ts with hyperscript or .jsx is okay) with mithril as the current development experience with .tsx is... not good. You can get things run with .tsx, but with lots of warnings on JSX typings...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Documentation For anything dealing mainly with the documentation itself Type: Enhancement For any feature request or suggestion that isn't a bug fix
Projects
None yet
Development

No branches or pull requests

5 participants