Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion packages/rspack/etc/core.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -5536,7 +5536,6 @@ export type Output = {
chunkFilename?: ChunkFilename;
crossOriginLoading?: CrossOriginLoading;
cssFilename?: CssFilename;
cssHeadDataCompression?: boolean;
cssChunkFilename?: CssChunkFilename;
hotUpdateMainFilename?: HotUpdateMainFilename;
hotUpdateChunkFilename?: HotUpdateChunkFilename;
Expand Down
7 changes: 0 additions & 7 deletions packages/rspack/src/config/normalization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import path from 'node:path';
import type { HttpUriPluginOptions } from '../builtin-plugin';
import type { Compilation } from '../Compilation';
import type WebpackError from '../lib/WebpackError';
import { deprecate } from '../util';
import type {
Amd,
AssetModuleFilename,
Expand Down Expand Up @@ -150,12 +149,6 @@ export const getNormalizedRspackOptions = (
)(config.entry)
: getNormalizedEntryStatic(config.entry),
output: nestedConfig(config.output, (output) => {
if ('cssHeadDataCompression' in output) {
deprecate(
'cssHeadDataCompression is not used now, see https://github.com/web-infra-dev/rspack/pull/8534, this option could be removed in the future',
);
}

const { library } = output;
const libraryAsName = library;
const libraryBase =
Expand Down
9 changes: 0 additions & 9 deletions packages/rspack/src/config/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -484,15 +484,6 @@ export type Output = {
/** This option determines the name of CSS output files on disk. */
cssFilename?: CssFilename;

/**
* @deprecated this config is unused, and will be removed in the future.
* Rspack adds some metadata in CSS to parse CSS modules, and this configuration determines whether to compress these metadata.
*
* The value is `true` in production mode.
* The value is `false` in development mode.
* */
cssHeadDataCompression?: boolean;

/** This option determines the name of non-initial CSS output files on disk. */
cssChunkFilename?: CssChunkFilename;

Expand Down
33 changes: 0 additions & 33 deletions website/docs/en/config/output.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1895,36 +1895,3 @@ Please use [`output.library.type`](#outputlibrarytype) instead as we might drop
:::warning
Prefer to use [`output.library.umdNamedDefine`](#outputlibraryumdnameddefine) instead.
:::

## output.cssHeadDataCompression

<ApiMeta addedVersion={'1.0.0'} />

- **Type:** `boolean`
- **Default:** `false` for development mode, `true` for production mode

Rspack adds some metadata in CSS to parse CSS modules, and this configuration determines whether to compress these metadata.

For example

```css
.local-a {
color: blue;
}

head {
--webpack-main: a: local-a/&\.\/ src\/index\.module\.css;
}
```

After compress 👇

```css
.local-a {
color: blue;
}

head {
--webpack-main: &\.\/ srcăindexāmoduleācss;
}
```
33 changes: 0 additions & 33 deletions website/docs/zh/config/output.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1887,36 +1887,3 @@ export default {
:::warning
最好使用 [`output.library.umdNamedDefine`](#outputlibraryumdnameddefine)。
:::

## output.cssHeadDataCompression

<ApiMeta addedVersion={'1.0.0'} />

- **类型:** `boolean`
- **默认值:** 在 development 模式下为 `false`,在 production 模式下为 `true`

Rspack 会在 CSS 中添加一些元信息,用以解析 CSS modules,此配置决定是否压缩元信息。

例如 👇

```css
.local-a {
color: blue;
}

head {
--webpack-main: a: local-a/&\.\/ src\/index\.module\.css;
}
```

压缩后

```css
.local-a {
color: blue;
}

head {
--webpack-main: &\.\/ srcăindexāmoduleācss;
}
```
Loading