Microbundle
tsdx
Our great sponsors
Microbundle | tsdx | |
---|---|---|
18 | 45 | |
7,904 | 11,131 | |
- | 0.2% | |
4.6 | 0.0 | |
about 2 months ago | 9 months ago | |
JavaScript | JavaScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Microbundle
-
How to Build and Publish Your First React NPM Package
To begin, you need to prepare your environment. A few ways to build a React package include tools like Bit, Storybook, Lerna, and TSDX. However, for this tutorial, you will use a zero-configuration bundler for tiny modules called Microbundle.
-
micro-ts , a minimalist template to build packages with TypeScript
I discovered microbundle lately, and I would like to share with you a mini template with the bare essentials and comfort to develop your packages with TypeScript.
- How to create a component library?
-
How do I properly learn Typescript?
For package authoring - microbundle is a handy boilerplate (I would avoid tsdx personally - it’s basically been abandoned for turborepo but that’s not apparent at first glance).
-
What I learned from making my first OSS NPM package/Component Library
My tech stack was React + Typescript, Storybook for docs, vite.js for build instead of webpack, microbundle for bundling (basically a no-config rollup wrapper), and Google's release please bot for handling release/deployment.
-
Microbundle is not enough
Setting up a modern Typescript or Javascript development stack is a daunting task, there are a lot of moving parts, and sometimes the whole process seems like magic, so I switched to Microbundle. While microbundle handles the compilation, there are a lot of other moving parts that need to be set up to start developing with Nodejs/Typescript (CI, tests, linting, etc). So I've created an opinionated template repository with Typescript, Microbundle, Jest, eslint, husky, prettier, github actions, pnpm, and a bunch of other scripts. It enables me to start developing a library immediately by using the repository as a starter template. Let me know what you think and if some processes could be improved, or some valuable tools that could be added. Pull requests and suggestions are welcomed.
-
Creating a react library, why bundle to ESM?
I would recommend starting by using https://github.com/developit/microbundle , as it has pretty good default behavior for generating library output.
-
Beginner's Thread / Easy Questions (November 2021)
Check out microbundle, which is what TSDX started as a typescript alternative to.
-
I want to create a component library.
I’m quite happy with Microbundle
-
Microbundle VS bundle - a user suggested alternative
2 projects | 17 Sep 2021
tsdx
-
ReactJS Good Practices
tsdx - Zero-config CLI for TypeScript package development
-
Using Next.js components in a custom npm library
Thanks for the insight fellas. Aside question, I was thinking of bootstrapping the project with tsdx, but their last release was well over 2 years ago. Wondering if there are any alternative options for creating libraries?
-
Rollup Library Starter
NOTE: If your project uses TypeScript, I would suggest using tsdx instead.
-
Creating Modern npm Packages
Sadly, it's a bit dead. We switched to dts-cli fork, but tsup looks good too
Used https://tsdx.io/ recently to do this, saved a lot of time and effort.
-
TypeScript is terrible for library developers
I don't depend on the actual typescript docs much but thankfully in @types and in tons of repos there are examples of well written typescript code.
The amount of JS and TS out there is also a bit of a foot gun though so stick with heavily used/starred libs if you aren't sure.
One tool that helps a lot with developing libraries in typescript is TSDX[0] or its successor dts-cli[1] and there is a bunch of good stuff in awesesome-typescript[2].
Maybe library devving is harder?(more work?) with tyepscript but it is worth it for the end developer, especially if that end developer is you. If you aren't using your own libs then you're probably getting paid by someone else to make them or... idk.
-
How to create your own React Components library
We will use a TSDX library - this tool is something similar to create-react-app, but for creating components library. It allows as to initialize a project immediately with already set up bundler, Rollup with Typescript supporting, testing with Jest, code formatter, Prettier and Storybook.
-
Is there a point in writing in TypeScript personal projects that I will maintain myself?
May be you need to try https://tsdx.io/
-
The Node ecosystem (still) has tooling problems
So what is the ideal way to build TypeScript libraries? I've heard that tsdx https://tsdx.io/ is quite good
-
How to include dependent types in library build?
I'd just add the types as a dependency but if you want to bundle them then afaik https://github.com/jaredpalmer/tsdx can do it (though I have never tried).
What are some alternatives?
turborepo - Incremental bundler and build system optimized for JavaScript and TypeScript, written in Rust – including Turborepo and Turbopack. [Moved to: https://github.com/vercel/turbo]
parcel - The zero configuration build tool for the web. 📦🚀
Rollup - Next-generation ES module bundler
tsup - The simplest and fastest way to bundle your TypeScript libraries.
webpack - A bundler for javascript and friends. Packs many modules into a few bundled assets. Code Splitting allows for loading parts of the application on demand. Through "loaders", modules can be CommonJs, AMD, ES6 modules, CSS, Images, JSON, Coffeescript, LESS, ... and your custom stuff.
create-react-app - Set up a modern web app by running one command.
nx - Smart Monorepos · Fast CI
esbuild - An extremely fast bundler for the web
lerna-with-nextjs
twin.macro - 🦹‍♂️ Twin blends the magic of Tailwind with the flexibility of css-in-js (emotion, styled-components, solid-styled-components, stitches and goober) at build time.
rollup-react-example - An example React application using Rollup with ES modules, dynamic imports, Service Workers, and Flow.