Giter Site home page Giter Site logo

klap vs microbundle? about klap HOT 7 OPEN

osdevisnot avatar osdevisnot commented on May 18, 2024 2
klap vs microbundle?

from klap.

Comments (7)

osdevisnot avatar osdevisnot commented on May 18, 2024 4

I did a quick comparison between klap, microbundle and tsdx. Here are notable differences:

👼 Comparison with microbundle and tsdx

Feature klap microbundle tsdx
Typescript Support
No Dependencies
Scaffolding
Dev Server
CSS
CSS Modules
Build Constants
Testing/Linting

We should probably start supporting build constants and some variation of CSS (maybe using postcss).

The testing/linting setup is not a primary goal for klap and we can skip it.

from klap.

tunnckoCore avatar tunnckoCore commented on May 18, 2024 2

For me, personally

  • cleaner and more organized codebase
  • zero deps
  • different set of default babel and rollup plugins
  • microbundle supports Buble

from klap.

osdevisnot avatar osdevisnot commented on May 18, 2024 1

Let's add comparison section in readme. I'll keep this open in case someone gets there before me.

from klap.

osdevisnot avatar osdevisnot commented on May 18, 2024 1

@tunnckoCore it seems microbundle moved away from buble. Am I missing something?

from klap.

osdevisnot avatar osdevisnot commented on May 18, 2024 1

Build constants are essentially constant variables that are pre-defined. Similar to process.env.NODE_ENV, but more granular.

For example, you can define a constant called DEBUG = true and use DEBUG in your library code when developing, maybe like this:

if(DEBUG){
	console.log('this was never supposed to happen')
}

Then you just run the build for distribution with DEBUG = false and all your code within the if block get's removed.

Another use case is when you want to create multiple versions of your library with certain features on/off based on a defined build constant.

from klap.

tunnckoCore avatar tunnckoCore commented on May 18, 2024 1

Exactly. TSDX does this. Dev expressions, node_env and etc, also uses the replace plugin, so.. probably possible to customize further.

from klap.

tunnckoCore avatar tunnckoCore commented on May 18, 2024

Yup, true, they kind of moved to a hybrid approach as I remember.

Agree.

Build Constants

What do you mean with that? TSDX supports transforming such things, I think. :)

from klap.

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.