> For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.

# Low-Level Tools

## Usage

Modern.js internally integrates tools such as [TypeScript](https://www.typescriptlang.org/), [Rspack](https://rspack.rs/), [PostCSS](https://postcss.org/), [SWC](https://swc.rs/) by default.

Usually, the default configuration can meet most development needs. When there are special needs, it can be achieved through the underlying configuration.

Take configuring Rspack as an example, just add [tools.rspack](/configure/app/tools/rspack.md) to the modern.config.ts:

```ts title="modern.config.ts"
export default defineConfig({
  tools: {
    rspack: config => {
      // Modify Rspack configuration
    },
  },
});
```

Configurations in the `tools` can be set to `Object` or `Function`.

When the value is `Object`, it will be merged with the default configuration. For the specific merging strategy, refer to the configuration options document (see table below).

When the value is `Function`, the first parameter is the default configuration value. You can directly modify this object without returning it, or you can return a new object or a merged object as the final result.

## Low-level Configuration Details

Currently provided is as follows:

| Tools              | Config                                                                  |
| ------------------ | ----------------------------------------------------------------------- |
| Rspack             | [tools.rspack](/configure/app/tools/rspack.md)                          |
| Bundler Chain      | [tools.bundlerChain](/configure/app/tools/bundler-chain.md)             |
| SWC                | [tools.swc](/configure/app/tools/swc.md)                                |
| TypeScript Checker | [tools.tsChecker](/configure/app/tools/ts-checker.md)                   |
| PostCSS            | [tools.postcss](/configure/app/tools/postcss.md)                        |
| Less               | [tools.less](/configure/app/tools/less.md)                              |
| Sass               | [tools.sass](/configure/app/tools/sass.md)                              |
| CSS Extract        | [tools.cssExtract](/configure/app/tools/css-extract.md)                 |
| CSS Loader         | [tools.cssLoader](/configure/app/tools/css-loader.md)                   |
| Style Loader       | [tools.styleLoader](/configure/app/tools/style-loader.md)               |
| Lightning CSS      | [tools.lightningcssLoader](/configure/app/tools/lightningcss-loader.md) |
| Minify CSS         | [tools.minifyCss](/configure/app/tools/minify-css.md)                   |
| Autoprefixer       | [tools.autoprefixer](/configure/app/tools/autoprefixer.md)              |
| HTML Plugin        | [tools.htmlPlugin](/configure/app/tools/html-plugin.md)                 |
