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
73 changes: 0 additions & 73 deletions e2e/cases/performance/moment-locale/index.test.ts

This file was deleted.

3 changes: 0 additions & 3 deletions e2e/cases/performance/moment-locale/src/index.js

This file was deleted.

1 change: 0 additions & 1 deletion e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"@module-federation/runtime-tools": "0.22.1",
"core-js": "^3.47.0",
"lodash": "^4.17.21",
"moment": "^2.30.1",
"preact": "^10.28.2",
"react": "^19.2.3",
"react-dom": "^19.2.3",
Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/createRsbuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ import { pluginLazyCompilation } from './plugins/lazyCompilation';
import { pluginManifest } from './plugins/manifest';
import { pluginMinimize } from './plugins/minimize';
import { pluginModuleFederation } from './plugins/moduleFederation';
import { pluginMoment } from './plugins/moment';
import { pluginNodeAddons } from './plugins/nodeAddons';
import { pluginNonce } from './plugins/nonce';
import { pluginOutput } from './plugins/output';
Expand Down Expand Up @@ -95,7 +94,6 @@ function applyDefaultPlugins(
pluginHtml(context),
pluginAppIcon(),
pluginWasm(),
pluginMoment(),
pluginNodeAddons(),
pluginDefine(),
pluginCss(),
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/defaultConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ const getDefaultToolsConfig = (): NormalizedToolsConfig => ({
const getDefaultPerformanceConfig = (): NormalizedPerformanceConfig => ({
printFileSize: true,
removeConsole: false,
removeMomentLocale: false,
chunkSplit: {
strategy: 'split-by-experience',
},
Expand Down
23 changes: 0 additions & 23 deletions packages/core/src/plugins/moment.ts

This file was deleted.

6 changes: 0 additions & 6 deletions packages/core/src/types/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -735,12 +735,6 @@ export interface PerformanceConfig {
*/
removeConsole?: boolean | ConsoleType[];

/**
* Whether to remove the locales of [moment.js](https://momentjs.com/).
* @default false
*/
removeMomentLocale?: boolean;

/**
* To enable or configure persistent build cache.
* @experimental This feature is experimental and may be changed in the future.
Expand Down
9 changes: 0 additions & 9 deletions packages/core/tests/__snapshots__/environments.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ exports[`environment config > should normalize environment config correctly 1`]
},
"printFileSize": true,
"removeConsole": false,
"removeMomentLocale": false,
},
"resolve": {
"alias": {
Expand Down Expand Up @@ -250,7 +249,6 @@ exports[`environment config > should normalize environment config correctly 2`]
},
"printFileSize": true,
"removeConsole": false,
"removeMomentLocale": false,
},
"resolve": {
"alias": {
Expand Down Expand Up @@ -412,7 +410,6 @@ exports[`environment config > should print environment config when inspect confi
},
"printFileSize": true,
"removeConsole": false,
"removeMomentLocale": false,
},
"resolve": {
"alias": {
Expand Down Expand Up @@ -570,7 +567,6 @@ exports[`environment config > should print environment config when inspect confi
},
"printFileSize": true,
"removeConsole": false,
"removeMomentLocale": false,
},
"resolve": {
"alias": {
Expand Down Expand Up @@ -748,7 +744,6 @@ exports[`environment config > should support modify environment config by api.mo
},
"printFileSize": true,
"removeConsole": false,
"removeMomentLocale": false,
},
"resolve": {
"alias": {
Expand Down Expand Up @@ -906,7 +901,6 @@ exports[`environment config > should support modify environment config by api.mo
},
"printFileSize": true,
"removeConsole": false,
"removeMomentLocale": false,
},
"resolve": {
"alias": {
Expand Down Expand Up @@ -1065,7 +1059,6 @@ exports[`environment config > should support modify environment config by api.mo
},
"printFileSize": true,
"removeConsole": false,
"removeMomentLocale": false,
},
"resolve": {
"alias": {
Expand Down Expand Up @@ -1227,7 +1220,6 @@ exports[`environment config > should support modify single environment config by
},
"printFileSize": true,
"removeConsole": false,
"removeMomentLocale": false,
},
"resolve": {
"alias": {
Expand Down Expand Up @@ -1385,7 +1377,6 @@ exports[`environment config > should support modify single environment config by
},
"printFileSize": true,
"removeConsole": false,
"removeMomentLocale": false,
},
"resolve": {
"alias": {
Expand Down
8 changes: 0 additions & 8 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 0 additions & 27 deletions website/docs/en/config/performance/remove-moment-locale.mdx

This file was deleted.

1 change: 0 additions & 1 deletion website/docs/en/guide/start/features.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ Overview of the main features supported by Rsbuild.
| Analyze build process | Optional feature, use Rsdoctor to analyze build process | <ul><li>[Use Rsdoctor](/guide/debug/rsdoctor)</li></ul> |
| Analyze bundle size | Optional feature, analyze bundle size through Rsdoctor | <ul><li>[Use Rsdoctor](/guide/debug/rsdoctor)</li></ul> |
| Remove console | Optional feature, remove `console.[methodName]` in code | <ul><li>[performance.removeConsole](/config/performance/remove-console)</li ></ul> |
| Optimize moment.js size | Optional feature, remove the redundant locale files of moment.js | <ul><li>[performance.removeMomentLocale](/config/performance/remove-moment-locale)</li></ul> |
| Dedupe packages | Optional feature, remove duplicate npm packages | <ul><li>[resolve.dedupe](/config/resolve/dedupe)</li></ul> |
| Component on-demand import | Optional feature, selectively import code and styles from component libraries | <ul><li>[source.transformImport](/config/source/transform-import)</li></ul> |
| Image compression | Optional feature, compress used image resources | <ul><li>[Image compress plugin](https://github.com/rstackjs/rsbuild-plugin-image-compress)</li></ul> |
Expand Down
27 changes: 0 additions & 27 deletions website/docs/zh/config/performance/remove-moment-locale.mdx

This file was deleted.

29 changes: 14 additions & 15 deletions website/docs/zh/guide/start/features.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -93,18 +93,17 @@

## 性能和调试

| 功能 | 描述 | 相关链接 |
| ------------------- | -------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| 代码拆分 | Rsbuild 中内置了多种拆包策略,自动将代码包拆分为体积适中的文件 | <ul><li>[代码拆分](/guide/optimization/code-splitting)</li><li>[performance.chunkSplit](/config/performance/chunk-split)</li></ul> |
| 展示产物体积 | 在生产模式构建后,默认展示所有静态资源的体积信息 | <ul><li>[performance.printFileSize](/config/performance/print-file-size)</li></ul> |
| 分析构建流程 | 可选功能,使用 Rsdoctor 分析构建流程 | <ul><li>[使用 Rsdoctor](/guide/debug/rsdoctor)</li></ul> |
| 分析产物体积 | 可选功能,通过 Rsdoctor 分析产物体积 | <ul><li>[使用 Rsdoctor](/guide/debug/rsdoctor)</li></ul> |
| 移除 console | 可选功能,移除代码中的 `console.[methodName]` | <ul><li>[performance.removeConsole](/config/performance/remove-console)</li></ul> |
| 优化 moment.js 体积 | 可选功能,移除 moment.js 多余的 locale 文件 | <ul><li>[performance.removeMomentLocale](/config/performance/remove-moment-locale)</li></ul> |
| 移除重复包 | 可选功能,移除重复引用的 npm 包 | <ul><li>[resolve.dedupe](/config/resolve/dedupe)</li></ul> |
| 组件库按需引入 | 可选功能,按需引入组件库的代码和样式 | <ul><li>[source.transformImport](/config/source/transform-import)</li></ul> |
| 图片压缩 | 可选功能,对引用的图片资源进行压缩处理 | <ul><li>[Image compress 插件](https://github.com/rstackjs/rsbuild-plugin-image-compress)</li></ul> |
| Preload | 可选功能,对资源进行预加载 | <ul><li>[performance.preload](/config/performance/preload)</li></ul> |
| Prefetch | 可选功能,对资源进行预获取 | <ul><li>[performance.prefetch](/config/performance/prefetch)</li></ul> |
| Preconnect | 可选功能,对资源进行预连接 | <ul><li>[performance.preconnect](/config/performance/preconnect)</li></ul> |
| DNS prefetch | 可选功能,对资源进行 DNS 预获取 | <ul><li>[performance.dnsPrefetch](/config/performance/dns-prefetch)</li></ul> |
| 功能 | 描述 | 相关链接 |
| -------------- | -------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| 代码拆分 | Rsbuild 中内置了多种拆包策略,自动将代码包拆分为体积适中的文件 | <ul><li>[代码拆分](/guide/optimization/code-splitting)</li><li>[performance.chunkSplit](/config/performance/chunk-split)</li></ul> |
| 展示产物体积 | 在生产模式构建后,默认展示所有静态资源的体积信息 | <ul><li>[performance.printFileSize](/config/performance/print-file-size)</li></ul> |
| 分析构建流程 | 可选功能,使用 Rsdoctor 分析构建流程 | <ul><li>[使用 Rsdoctor](/guide/debug/rsdoctor)</li></ul> |
| 分析产物体积 | 可选功能,通过 Rsdoctor 分析产物体积 | <ul><li>[使用 Rsdoctor](/guide/debug/rsdoctor)</li></ul> |
| 移除 console | 可选功能,移除代码中的 `console.[methodName]` | <ul><li>[performance.removeConsole](/config/performance/remove-console)</li></ul> |
| 移除重复包 | 可选功能,移除重复引用的 npm 包 | <ul><li>[resolve.dedupe](/config/resolve/dedupe)</li></ul> |
| 组件库按需引入 | 可选功能,按需引入组件库的代码和样式 | <ul><li>[source.transformImport](/config/source/transform-import)</li></ul> |
| 图片压缩 | 可选功能,对引用的图片资源进行压缩处理 | <ul><li>[Image compress 插件](https://github.com/rstackjs/rsbuild-plugin-image-compress)</li></ul> |
| Preload | 可选功能,对资源进行预加载 | <ul><li>[performance.preload](/config/performance/preload)</li></ul> |
| Prefetch | 可选功能,对资源进行预获取 | <ul><li>[performance.prefetch](/config/performance/prefetch)</li></ul> |
| Preconnect | 可选功能,对资源进行预连接 | <ul><li>[performance.preconnect](/config/performance/preconnect)</li></ul> |
| DNS prefetch | 可选功能,对资源进行 DNS 预获取 | <ul><li>[performance.dnsPrefetch](/config/performance/dns-prefetch)</li></ul> |
Loading