---
sidebar_position: 4
---

# Tech Stack

The Modern.js framework comes with built-in popular libraries and development tools from the community.

In this document, you can learn about the main technology stack involved in the Modern.js framework, as well as some optional libraries and tools.

## UI Library

Modern.js uses [React 18](https://react.dev/) to build user interfaces and is also compatible with React 17.

Rsbuild supports building Vue applications. If you need to use Vue, you can refer to ["Rsbuild - Vue"](https://rsbuild.dev/guide/framework/vue).

## Routing

Modern.js uses [React Router 6](https://reactrouter.com/en/main) for routing and is also compatible with React Router 5.

Modern.js supports conventional routing, self-controlled routing, or other routing schemes. Please refer to ["Routing"](/en/guides/basic-features/routes) to make your choice.

## Micro Frontends

Modern.js provides out-of-the-box support for the [Garfish](https://www.garfishjs.org/) micro frontend framework.

We are also working with Zack Jackson, the author of [Module Federation](https://webpack.js.org/concepts/module-federation/), to provide a more comprehensive solution.

## State Management

Modern.js can be used with any community state management library, such as [Redux](https://redux.js.org/), [Jotai](https://jotai.org/), [Zustand](https://docs.pmnd.rs/zustand), [Valtio](https://valtio.pmnd.rs/), and more.

## Package Manager

Modern.js can be used with any community package manager, such as [npm](https://www.npmjs.com/package/npm), [yarn](https://classic.yarnpkg.com/lang/en/), [pnpm](https://pnpm.io/), or [Bun](https://bun.sh/).

We recommend using pnpm for faster installation speed.

## Bundler

Modern.js uses [Webpack 5](https://webpack.js.org/) or [Rspack](https://www.rspack.dev/) to bundle your web applications.

The default bundler used is Webpack 5. You can refer to ["Using Rspack"](/en/guides/advanced-features/rspack-start) to switch to the faster Rspack.

## Transpiler

Modern.js uses [Babel](https://babeljs.io/), [SWC](https://swc.rs/), or [esbuild](https://esbuild.github.io/) as JavaScript transpiler to transform TypeScript or JSX into JavaScript code that can run in browsers and perform syntax downgrades.

- When using Webpack for bundling, the default tool is Babel, which can be switched to SWC or esbuild.
- When using Rspack for bundling, the default tool is SWC, which can be switched to Babel.

## Minimizer

During production builds, Modern.js uses [Terser](https://github.com/terser/terser), [SWC](https://swc.rs/), or [esbuild](https://esbuild.github.io/) to minify JavaScript code, and [cssnano](https://cssnano.co/) to minify CSS code.

- When using Webpack for bundling, the default tool for minifying JS code is Terser, which can be switched to SWC or esbuild.
- When using Rspack for bundling, the default tool for minifying JS code is SWC, and switching to other tools is not currently supported.

## CSS Transformer

Modern.js uses [PostCSS](https://postcss.org/) to transform CSS code and enables [autoprefixer](https://github.com/postcss/autoprefixer) by default to add CSS prefixes.

Modern.js supports enabling ["Lightning CSS"](/configure/app/tools/lightningcss-loader), which uses Lightning CSS to downgrade CSS syntax.

Modern.js supports enabling ["Tailwind CSS"](/guides/basic-features/css/tailwindcss) and is compatible with both Tailwind CSS v2 and v3.

## CSS Preprocessors

Modern.js supports three CSS preprocessors: [Sass](https://sass-lang.com/), [Less](https://lesscss.org/), and [Stylus](https://stylus-lang.com/):

- Sass and Less are supported by default and ready to use.
- Stylus is optional and can be used by referring to the ["Stylus Plugin"](https://rsbuild.dev/plugins/list/plugin-stylus).

## CSS Modules

Modern.js provides out-of-the-box support for [CSS Modules](https://github.com/css-modules/css-modules), which is implemented internally based on [css-loader](https://www.npmjs.com/package/css-loader).

Please refer to ["Use CSS Modules"](/guides/basic-features/css/css-modules) for usage instructions.

## CSS-in-JS

Modern.js supports the use of [styled-components](https://styled-components.com/). Please refer to ["Using CSS-in-JS"](/en/guides/basic-features/css/css-in-js) for usage instructions.

If you need to use other CSS-in-JS solutions, you can integrate them into your project on your own.

## UI Components

Modern.js can be used with any React UI component library from the community, such as [MUI](https://mui.com/), [Ant Design](https://ant.design/), [Arco Design](https://github.com/arco-design/arco-design), [Semi Design](https://semi.design/), [Radix UI](https://www.radix-ui.com/), and more.

Additionally, Modern.js provides built-in support for [on-demand import](/configure/app/source/transform-import) of Ant Design and Arco Design.

## Component Development

Modern.js supports the use of [Storybook](https://storybook.js.org/) for developing UI components. This feature is optional. Please refer to ["Using Storybook"](/guides/basic-features/debug/using-storybook) to enable it.

## Node.js Framework

import TechStackNodeFramework from '@site-docs-en/components/tech-stack-node-framework';

<TechStackNodeFramework />
