logo
  • Guide
  • Config
  • Plugin
  • API
  • Examples
  • Community
  • Modern.js 2.x Docs
  • English
    • 简体中文
    • English
    • Start
      Introduction
      Quick Start
      Upgrading
      Glossary
      Tech Stack
      Core Concept
      Page Entry
      Build Engine
      Web Server
      Basic Features
      Routes
      Routing
      Config Routes
      Data Solution
      Data Fetching
      Data Writing
      Data Caching
      Rendering
      Server-Side Rendering
      Streaming SSR
      Rendering Cache
      Static Site Generation
      Render Preprocessing
      Styling
      Styling
      Use CSS Modules
      Using CSS-in-JS
      Using Tailwind CSS
      HTML Template
      Import Static Assets
      Import JSON Files
      Import SVG Assets
      Import Wasm Assets
      Debug
      Data Mocking
      Network Proxy
      Using Rsdoctor
      Using Storybook
      Testing
      Playwright
      Vitest
      Jest
      Cypress
      Path Alias
      Environment Variables
      Output Files
      Deploy Application
      Advanced Features
      Using Rspack
      Using BFF
      Basic Usage
      Runtime Framework
      Extend BFF Server
      Extend Request SDK
      File Upload
      Cross-Project Invocation
      Optimize Page Performance
      Code Splitting
      Inline Static Assets
      Bundle Size Optimization
      React Compiler
      Improve Build Performance
      Browser Compatibility
      Low-Level Tools
      Source Code Build Mode
      Server Monitor
      Monitors
      Logs Events
      Metrics Events
      Internationalization
      Basic Concepts
      Quick Start
      Configuration
      Locale Detection
      Resource Loading
      Routing Integration
      API Reference
      Advanced Usage
      Best Practices
      Custom Web Server
      Topic Detail
      Module Federation
      Introduction
      Getting Started
      Application-Level Modules
      Server-Side Rendering
      Deployment
      Integrating Internationalization
      FAQ
      Dependencies FAQ
      CLI FAQ
      Build FAQ
      HMR FAQ
      Deprecated
      📝 Edit this page
      Previous pageGlossaryNext pagePage Entry

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

      #Routing

      Modern.js uses React Router v7 for routing.

      Modern.js supports conventional routing, self-controlled routing, or other routing schemes. Please refer to "Routing" to make your choice.

      #Package Manager

      Modern.js can be used with any community package manager, such as npm, yarn, pnpm, or Bun.

      We recommend using pnpm for faster installation speed.

      #Bundler

      Modern.js uses Webpack 5 or Rspack to bundle your web applications.

      The default bundler used is Webpack 5. You can refer to "Using Rspack" to switch to the faster Rspack.

      #Transpiler

      Modern.js uses Babel, SWC, or esbuild 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, SWC, or esbuild to minify JavaScript code, and cssnano 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 to transform CSS code and enables autoprefixer by default to add CSS prefixes.

      Modern.js supports enabling "Lightning CSS", which uses Lightning CSS to downgrade CSS syntax.

      Modern.js supports enabling "Tailwind CSS" and is compatible with both Tailwind CSS v3 and v4.

      #CSS Preprocessors

      Modern.js supports three CSS preprocessors: Sass, Less, and Stylus:

      • Sass and Less are supported by default and ready to use.
      • Stylus is optional and can be used by referring to the "Stylus Plugin".

      #CSS Modules

      Modern.js provides out-of-the-box support for CSS Modules, which is implemented internally based on css-loader.

      Please refer to "Use CSS Modules" for usage instructions.

      #CSS-in-JS

      Modern.js supports the use of styled-components. Please refer to "Using 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, Ant Design, Arco Design, Semi Design, Radix UI, and more.

      #Component Development

      Modern.js supports the use of Storybook for developing UI components. This feature is optional. Please refer to "Using Storybook" to enable it.

      #Node.js Framework

      Modern.js Server and BFF use Hono.js as the runtime framework, and you can extend the Server based on the Hono.js ecosystem. Please refer to Custom Web Server.