Coder Social home page Coder Social logo

make vite the default about mithril.js HOT 4 OPEN

laoshaw avatar laoshaw commented on June 14, 2024 1
make vite the default

from mithril.js.

Comments (4)

panoply avatar panoply commented on June 14, 2024

ESbuild FTW.

from mithril.js.

laoshaw avatar laoshaw commented on June 14, 2024

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)

from mithril.js.

webketje avatar webketje commented on June 14, 2024

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?

from mithril.js.

idlist avatar idlist commented on June 14, 2024

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...

from mithril.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.