Giter Site home page Giter Site logo

web-infra-dev / rsbuild Goto Github PK

View Code? Open in Web Editor NEW
1.1K 12.0 85.0 21.49 MB

The Rspack-based build tool. It's fast, out-of-the-box and extensible.

Home Page: https://rsbuild.dev/

License: MIT License

JavaScript 5.92% TypeScript 91.48% SCSS 0.26% AppleScript 0.21% HTML 0.41% Vue 0.64% CSS 0.72% Less 0.13% Stylus 0.03% Pug 0.01% Svelte 0.20%
build-tool rspack webpack

rsbuild's People

Contributors

10derozan avatar 9aoy avatar asuka109 avatar bottlewook avatar caohuilin avatar chenjiahan avatar easy1090 avatar fi3ework avatar fireairforce avatar inottn avatar jinchaofs avatar jkzing avatar jserfeng avatar jungzl avatar lalalazero avatar liangchaofei avatar liyincode avatar nanianlisao avatar renovate[bot] avatar richerfu avatar sanyuan0704 avatar sooniter avatar sumy7 avatar targeral avatar timeless0911 avatar tmkx avatar wchenonly avatar xc2 avatar zhousg avatar zouhangwithsweet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rsbuild's Issues

Using Rspack as the default bundler

Modern.js Builder provides to provider: builder-rspack-provider and builder-webpack-provider.

In Rsbuild, the default builder is Rspack, which means builder-rspack-provider is builtin. And users can choose to downgrade to webpack via @rsbuild/webpack package.

Remove the `modern-web` build target

The only different between web and modern-web is the default browser range, we prefer to use .browserslistrc to control this.

So the modern-web is redundant.

Align the dist directory struct with other community tools

Modern.js Builder:

.
├── html
│   └── index
│       └── index.html
├── route.json
└── static
    ├── css
    │   ├── index.a9908140.css
    │   └── index.a9908140.css.map
    └── js
        ├── index.0084c5a4.js
        └──index.0084c5a4.js.map

Create React App:

.
├── asset-manifest.json
├── index.html
├── manifest.json
└── static
    ├── css
    │   ├── main.073c9b0a.css
    │   └── main.073c9b0a.css.map
    └── js
        ├── main.1470d868.js
        └── main.1470d868.js.map

Rsbuild should move the dist/html/index/index.html to dist/index.html by default, making it easier to deploy.

[Feature]: Provide an umd plugin

What problem does this feature solve?

Provide an umd plugin to help users building umd outputs.

What does the proposed API look like?

pluginUmd({
  // maybe some options
});

Adjust the default browserslist config

Overall

Rsbuild will by default target modern browsers to reduce bundle sizes.

Detail

The default browserslist config of Modern.js Builder:

> 0.01%
not dead
not op_mini all

The default browserslist config of Rsbuild:

const browserslist = [
  'chrome >= 87',
  'edge >= 88',
  'firefox >= 78',
  'safari >= 14',
];

This change should not affect Modern.js Framework.

[Bug]: The bundle size becomes larger after using the SWC plugin

Version

System:
    OS: macOS 12.6.5
    CPU: (10) arm64 Apple M1 Pro
    Memory: 3.30 GB / 32.00 GB
    Shell: 5.8.1 - /bin/zsh
  Browsers:
    Chrome: 114.0.5735.198
    Safari: 16.4.1
  npmPackages:
    @modern-js/app-tools: workspace:* => 2.25.1 
    @modern-js/plugin-swc: workspace:* => 2.25.1 
    @modern-js/runtime: workspace:* => 2.25.1

Details

Take modern.js/tests/integration/mwa-app as an example.

Before using SWC plugin:

Screen Shot 2023-07-04 at 11 00 11

After using SWC plugin:

Screen Shot 2023-07-04 at 11 00 07

Reproduce link

https://github.com/web-infra-dev/modern.js/tree/main/tests/integration/mwa-app

Reproduce Steps

  1. cd tests/integration/mwa-app
  2. pnpm run build

[Feature]: Assets retry supports dynamic chunks

What problem does this feature solve?

Currently the assets retry only supports initial chunks, we need to provide supports for dynamic chunks.

What does the proposed API look like?

No extra configurations.

Improve the CLI tool

  1. Add log to display the current Rspack / webpack version.
  2. Support explicit declaration to use webpack.
  3. Support use --config option to custom config file.

[Document]: Improve the decorators guide

[Feature]: Support only print total file sizes

What problem does this feature solve?

Some users may only care about the total size, Rsbuild should support only print total file sizes,

What does the proposed API look like?

export default {
  performance: {
    printFileSize: {
      // whether to print total size
      total?: boolean;
      // whether to print size of each file
      detail?: boolean;
    }
  }
}

Tasks for initial release

Workflow

Tasks

  1. ✨ enhancement
    caohuilin
  2. ✨ enhancement
    caohuilin
  3. ✨ enhancement
    9aoy

Decoupled from Modern.js

Tasks

  1. ✨ enhancement
    chenjiahan
  2. ✨ enhancement
    chenjiahan
  3. ✨ enhancement
    9aoy
  4. ✨ enhancement
    9aoy

Document

Tasks

  1. documentation
    chenjiahan
  2. documentation
    chenjiahan
  3. documentation
    chenjiahan
  4. documentation
    chenjiahan
  5. documentation
    chenjiahan
  6. documentation
    chenjiahan
  7. documentation
    chenjiahan
  8. documentation
  9. documentation
  10. documentation
  11. documentation 👏 PR welcome

Plugins

Tasks

  1. ✨ enhancement
    chenjiahan
  2. 9aoy
  3. ✨ enhancement
  4. ✨ enhancement
    9aoy
  5. ✨ enhancement
  6. ✨ enhancement
  7. 9aoy
  8. ✨ enhancement
  9. ✨ enhancement

Features

Tasks

  1. 💡 feature
    9aoy
  2. 💡 feature
    chenjiahan
  3. 💡 feature
  4. 👏 PR welcome 💡 feature
    jkzing
  5. 💡 feature
    9aoy

Others

Tasks

  1. ✨ enhancement
    chenjiahan
  2. ✨ enhancement
    chenjiahan
  3. ✨ enhancement
    chenjiahan
  4. ✨ enhancement
    chenjiahan
  5. 9aoy
  6. 9aoy
  7. ✨ enhancement
    chenjiahan
  8. ✨ enhancement
    chenjiahan
  9. ✨ enhancement
    chenjiahan
  10. ✨ enhancement
  11. ✨ enhancement
    9aoy
  12. ✨ enhancement

Enhance the config file

  1. Rename builder.config.ts to rsbuild.config.*
  2. defineConfig use the Rspack configuration type by default.

[Feature]: Support for dotenv

What problem does this feature solve?

Environment variables can be read from the following environments when building (lower to higher priority):

  • .env
  • .env.local
  • .env.[mode]
  • .env.[mode].local

What does the proposed API look like?

refer to: web-infra-dev/rspack#2208

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.