@modern-js/main-doc 2.58.0 → 2.58.2
Sign up to get free protection for your applications and to get access to all the features.
- package/docs/en/_meta.json +27 -0
- package/docs/en/apis/_meta.json +13 -0
- package/docs/en/apis/app/hooks/_meta.json +28 -0
- package/docs/en/apis/app/hooks/config/icon.mdx +1 -1
- package/docs/en/apis/app/runtime/_meta.json +50 -0
- package/docs/en/apis/app/runtime/web-server/unstable_middleware.mdx +2 -2
- package/docs/en/community/_meta.json +11 -0
- package/docs/en/community/blog/2022-0708-updates.md +95 -0
- package/docs/en/community/blog/2022-0910-updates.md +80 -0
- package/docs/en/community/blog/_meta.json +6 -0
- package/docs/en/community/blog/v2-release-note.mdx +246 -0
- package/docs/en/components/debug-app.mdx +1 -1
- package/docs/en/configure/_meta.json +78 -0
- package/docs/en/configure/app/bff/prefix.mdx +1 -1
- package/docs/en/configure/app/deploy/microFrontend.mdx +1 -1
- package/docs/en/configure/app/dev/asset-prefix.mdx +1 -1
- package/docs/en/configure/app/dev/before-start-url.mdx +1 -1
- package/docs/en/configure/app/dev/client.mdx +1 -1
- package/docs/en/configure/app/dev/hmr.mdx +1 -1
- package/docs/en/configure/app/dev/host.mdx +1 -1
- package/docs/en/configure/app/dev/https.mdx +1 -1
- package/docs/en/configure/app/dev/live-reload.mdx +1 -1
- package/docs/en/configure/app/dev/port.mdx +1 -1
- package/docs/en/configure/app/dev/progress-bar.mdx +1 -1
- package/docs/en/configure/app/dev/proxy.mdx +1 -1
- package/docs/en/configure/app/dev/setup-middlewares.mdx +1 -1
- package/docs/en/configure/app/dev/start-url.mdx +1 -1
- package/docs/en/configure/app/dev/watch-files.mdx +1 -1
- package/docs/en/configure/app/dev/write-to-disk.mdx +1 -1
- package/docs/en/configure/app/experiments/lazy-compilation.mdx +1 -1
- package/docs/en/configure/app/experiments/source-build.mdx +1 -1
- package/docs/en/configure/app/html/app-icon.mdx +1 -1
- package/docs/en/configure/app/html/crossorigin.mdx +1 -1
- package/docs/en/configure/app/html/disable-html-folder.mdx +1 -1
- package/docs/en/configure/app/html/favicon-by-entries.mdx +1 -1
- package/docs/en/configure/app/html/favicon.mdx +1 -1
- package/docs/en/configure/app/html/inject-by-entries.mdx +1 -1
- package/docs/en/configure/app/html/inject.mdx +1 -1
- package/docs/en/configure/app/html/meta-by-entries.mdx +1 -1
- package/docs/en/configure/app/html/meta.mdx +1 -1
- package/docs/en/configure/app/html/mount-id.mdx +1 -1
- package/docs/en/configure/app/html/script-loading.mdx +1 -1
- package/docs/en/configure/app/html/tags-by-entries.mdx +1 -1
- package/docs/en/configure/app/html/tags.mdx +1 -1
- package/docs/en/configure/app/html/template-by-entries.mdx +1 -1
- package/docs/en/configure/app/html/template-parameters-by-entries.mdx +1 -1
- package/docs/en/configure/app/html/template-parameters.mdx +1 -1
- package/docs/en/configure/app/html/template.mdx +1 -1
- package/docs/en/configure/app/html/title-by-entries.mdx +1 -1
- package/docs/en/configure/app/html/title.mdx +1 -1
- package/docs/en/configure/app/output/asset-prefix.mdx +1 -1
- package/docs/en/configure/app/output/assets-retry.mdx +1 -1
- package/docs/en/configure/app/output/charset.mdx +1 -1
- package/docs/en/configure/app/output/clean-dist-path.mdx +1 -1
- package/docs/en/configure/app/output/convert-to-rem.mdx +1 -1
- package/docs/en/configure/app/output/copy.mdx +1 -1
- package/docs/en/configure/app/output/css-module-local-ident-name.mdx +1 -1
- package/docs/en/configure/app/output/css-modules.mdx +1 -1
- package/docs/en/configure/app/output/data-uri-limit.mdx +1 -1
- package/docs/en/configure/app/output/disable-css-extract.mdx +1 -1
- package/docs/en/configure/app/output/disable-css-module-extension.mdx +1 -1
- package/docs/en/configure/app/output/disable-filename-hash.mdx +1 -1
- package/docs/en/configure/app/output/disable-inline-runtime-chunk.mdx +1 -1
- package/docs/en/configure/app/output/disable-minimize.mdx +1 -1
- package/docs/en/configure/app/output/disable-node-polyfill.mdx +1 -1
- package/docs/en/configure/app/output/disable-source-map.mdx +1 -1
- package/docs/en/configure/app/output/disable-svgr.mdx +1 -1
- package/docs/en/configure/app/output/disable-ts-checker.mdx +1 -1
- package/docs/en/configure/app/output/dist-path.mdx +1 -1
- package/docs/en/configure/app/output/enable-asset-fallback.mdx +1 -1
- package/docs/en/configure/app/output/enable-asset-manifest.mdx +1 -1
- package/docs/en/configure/app/output/enable-css-module-tsdeclaration.mdx +1 -1
- package/docs/en/configure/app/output/enable-inline-route-manifests.mdx +1 -1
- package/docs/en/configure/app/output/enable-inline-scripts.mdx +1 -1
- package/docs/en/configure/app/output/enable-inline-styles.mdx +1 -1
- package/docs/en/configure/app/output/enable-latest-decorators.mdx +1 -1
- package/docs/en/configure/app/output/externals.mdx +1 -1
- package/docs/en/configure/app/output/filename-hash.mdx +1 -1
- package/docs/en/configure/app/output/filename.mdx +1 -1
- package/docs/en/configure/app/output/legal-comments.mdx +1 -1
- package/docs/en/configure/app/output/override-browserslist.mdx +1 -1
- package/docs/en/configure/app/output/polyfill.mdx +1 -1
- package/docs/en/configure/app/output/splitRouteChunks.mdx +1 -1
- package/docs/en/configure/app/output/ssg.mdx +1 -1
- package/docs/en/configure/app/output/svg-default-export.mdx +1 -1
- package/docs/en/configure/app/output/temp-dir.mdx +1 -1
- package/docs/en/configure/app/performance/build-cache.mdx +1 -1
- package/docs/en/configure/app/performance/bundle-analyze.mdx +1 -1
- package/docs/en/configure/app/performance/chunk-split.mdx +1 -1
- package/docs/en/configure/app/performance/dns-prefetch.mdx +1 -1
- package/docs/en/configure/app/performance/preconnect.mdx +1 -1
- package/docs/en/configure/app/performance/prefetch.mdx +1 -1
- package/docs/en/configure/app/performance/preload.mdx +1 -1
- package/docs/en/configure/app/performance/print-file-size.mdx +1 -1
- package/docs/en/configure/app/performance/profile.mdx +1 -1
- package/docs/en/configure/app/performance/remove-console.mdx +1 -1
- package/docs/en/configure/app/performance/remove-moment-locale.mdx +1 -1
- package/docs/en/configure/app/performance/transform-lodash.mdx +1 -1
- package/docs/en/configure/app/runtime/{intro.mdx → 0-intro.mdx} +1 -1
- package/docs/en/configure/app/runtime/master-app.mdx +1 -1
- package/docs/en/configure/app/runtime/router.mdx +3 -1
- package/docs/en/configure/app/runtime/state.mdx +1 -1
- package/docs/en/configure/app/security/check-syntax.mdx +1 -1
- package/docs/en/configure/app/security/nonce.mdx +1 -1
- package/docs/en/configure/app/security/sri.mdx +1 -1
- package/docs/en/configure/app/server/base-url.mdx +1 -1
- package/docs/en/configure/app/server/enable-framework-ext.mdx +1 -1
- package/docs/en/configure/app/server/port.mdx +1 -1
- package/docs/en/configure/app/server/public-routes.mdx +1 -1
- package/docs/en/configure/app/server/routes.mdx +1 -1
- package/docs/en/configure/app/server/ssr-by-entries.mdx +1 -1
- package/docs/en/configure/app/server/ssr.mdx +1 -1
- package/docs/en/configure/app/source/alias-strategy.mdx +1 -1
- package/docs/en/configure/app/source/alias.mdx +1 -1
- package/docs/en/configure/app/source/config-dir.mdx +1 -1
- package/docs/en/configure/app/source/decorators.mdx +1 -1
- package/docs/en/configure/app/source/define.mdx +1 -1
- package/docs/en/configure/app/source/disable-default-entries.mdx +1 -1
- package/docs/en/configure/app/source/disable-entry-dirs.mdx +1 -1
- package/docs/en/configure/app/source/enable-async-entry.mdx +1 -1
- package/docs/en/configure/app/source/enable-custom-entry.mdx +1 -1
- package/docs/en/configure/app/source/entries-dir.mdx +1 -1
- package/docs/en/configure/app/source/entries.mdx +1 -1
- package/docs/en/configure/app/source/exclude.mdx +1 -1
- package/docs/en/configure/app/source/global-vars.mdx +1 -1
- package/docs/en/configure/app/source/include.mdx +1 -1
- package/docs/en/configure/app/source/mainEntryName.mdx +1 -1
- package/docs/en/configure/app/source/module-scopes.mdx +1 -1
- package/docs/en/configure/app/source/pre-entry.mdx +1 -1
- package/docs/en/configure/app/source/resolve-extension-prefix.mdx +1 -1
- package/docs/en/configure/app/source/resolve-main-fields.mdx +1 -1
- package/docs/en/configure/app/source/transform-import.mdx +1 -1
- package/docs/en/configure/app/tools/autoprefixer.mdx +1 -1
- package/docs/en/configure/app/tools/babel.mdx +1 -1
- package/docs/en/configure/app/tools/bundler-chain.mdx +1 -1
- package/docs/en/configure/app/tools/css-extract.mdx +1 -1
- package/docs/en/configure/app/tools/css-loader.mdx +1 -1
- package/docs/en/configure/app/tools/dev-server.mdx +1 -1
- package/docs/en/configure/app/tools/esbuild.mdx +2 -2
- package/docs/en/configure/app/tools/html-plugin.mdx +1 -1
- package/docs/en/configure/app/tools/less.mdx +1 -1
- package/docs/en/configure/app/tools/minify-css.mdx +1 -1
- package/docs/en/configure/app/tools/postcss.mdx +1 -1
- package/docs/en/configure/app/tools/pug.mdx +1 -1
- package/docs/en/configure/app/tools/rspack.mdx +1 -1
- package/docs/en/configure/app/tools/sass.mdx +1 -1
- package/docs/en/configure/app/tools/style-loader.mdx +1 -1
- package/docs/en/configure/app/tools/styled-components.mdx +1 -1
- package/docs/en/configure/app/tools/swc.mdx +2 -2
- package/docs/en/configure/app/tools/tailwindcss.mdx +1 -1
- package/docs/en/configure/app/tools/terser.mdx +1 -1
- package/docs/en/configure/app/tools/ts-checker.mdx +1 -1
- package/docs/en/configure/app/tools/ts-loader.mdx +1 -1
- package/docs/en/configure/app/tools/webpack-chain.mdx +1 -1
- package/docs/en/configure/app/tools/webpack.mdx +1 -1
- package/docs/en/guides/_meta.json +38 -0
- package/docs/en/guides/advanced-features/_meta.json +26 -0
- package/docs/en/guides/advanced-features/bff/_meta.json +6 -0
- package/docs/en/guides/advanced-features/rsbuild-plugin.mdx +9 -9
- package/docs/en/guides/advanced-features/ssr/_meta.json +5 -0
- package/docs/en/guides/basic-features/_meta.json +22 -0
- package/docs/en/guides/basic-features/data/_meta.json +4 -0
- package/docs/en/guides/concept/_meta.json +4 -0
- package/docs/en/guides/{deprecat.md → deprecated.md} +1 -1
- package/docs/en/guides/get-started/_meta.json +7 -0
- package/docs/en/guides/get-started/quick-start.mdx +2 -2
- package/docs/en/guides/get-started/upgrade.mdx +1 -1
- package/docs/en/guides/rsbuild-plugins/plugin-esbuild.mdx +205 -0
- package/docs/en/guides/rsbuild-plugins/plugin-swc.mdx +356 -0
- package/docs/en/guides/topic-detail/_meta.json +26 -0
- package/docs/en/guides/topic-detail/framework-plugin/_meta.json +10 -0
- package/docs/en/guides/topic-detail/generator/_meta.json +17 -0
- package/docs/en/guides/topic-detail/generator/create/_meta.json +5 -0
- package/docs/en/guides/topic-detail/generator/new/_meta.json +5 -0
- package/docs/en/guides/topic-detail/generator/plugin/_meta.json +11 -0
- package/docs/en/guides/topic-detail/model/_meta.json +14 -0
- package/docs/en/guides/troubleshooting/_meta.json +6 -0
- package/docs/en/guides/troubleshooting/dependencies.mdx +4 -4
- package/docs/en/tutorials/_meta.json +17 -0
- package/docs/zh/_meta.json +27 -0
- package/docs/zh/apis/_meta.json +13 -0
- package/docs/zh/apis/app/hooks/_meta.json +28 -0
- package/docs/zh/apis/app/hooks/config/icon.mdx +1 -1
- package/docs/zh/apis/app/runtime/_meta.json +50 -0
- package/docs/zh/apis/app/runtime/web-server/unstable_middleware.mdx +2 -2
- package/docs/zh/community/_meta.json +11 -0
- package/docs/zh/community/blog/_meta.json +6 -0
- package/docs/zh/community/blog/v2-release-note.mdx +1 -2
- package/docs/zh/components/debug-app.mdx +1 -1
- package/docs/zh/configure/_meta.json +78 -0
- package/docs/zh/configure/app/auto-load-plugin.mdx +1 -1
- package/docs/zh/configure/app/bff/prefix.mdx +1 -1
- package/docs/zh/configure/app/builder-plugins.mdx +1 -1
- package/docs/zh/configure/app/deploy/microFrontend.mdx +1 -1
- package/docs/zh/configure/app/dev/asset-prefix.mdx +1 -1
- package/docs/zh/configure/app/dev/before-start-url.mdx +1 -1
- package/docs/zh/configure/app/dev/client.mdx +1 -1
- package/docs/zh/configure/app/dev/hmr.mdx +1 -1
- package/docs/zh/configure/app/dev/host.mdx +1 -1
- package/docs/zh/configure/app/dev/https.mdx +1 -1
- package/docs/zh/configure/app/dev/live-reload.mdx +1 -1
- package/docs/zh/configure/app/dev/port.mdx +1 -1
- package/docs/zh/configure/app/dev/progress-bar.mdx +1 -1
- package/docs/zh/configure/app/dev/proxy.mdx +1 -1
- package/docs/zh/configure/app/dev/setup-middlewares.mdx +1 -1
- package/docs/zh/configure/app/dev/start-url.mdx +1 -1
- package/docs/zh/configure/app/dev/watch-files.mdx +1 -1
- package/docs/zh/configure/app/dev/write-to-disk.mdx +1 -1
- package/docs/zh/configure/app/experiments/lazy-compilation.mdx +1 -1
- package/docs/zh/configure/app/experiments/source-build.mdx +1 -1
- package/docs/zh/configure/app/html/app-icon.mdx +1 -1
- package/docs/zh/configure/app/html/crossorigin.mdx +1 -1
- package/docs/zh/configure/app/html/disable-html-folder.mdx +1 -1
- package/docs/zh/configure/app/html/favicon-by-entries.mdx +1 -1
- package/docs/zh/configure/app/html/favicon.mdx +1 -1
- package/docs/zh/configure/app/html/inject-by-entries.mdx +1 -1
- package/docs/zh/configure/app/html/inject.mdx +1 -1
- package/docs/zh/configure/app/html/meta-by-entries.mdx +1 -1
- package/docs/zh/configure/app/html/meta.mdx +1 -1
- package/docs/zh/configure/app/html/mount-id.mdx +1 -1
- package/docs/zh/configure/app/html/script-loading.mdx +1 -1
- package/docs/zh/configure/app/html/tags-by-entries.mdx +1 -1
- package/docs/zh/configure/app/html/tags.mdx +1 -1
- package/docs/zh/configure/app/html/template-by-entries.mdx +1 -1
- package/docs/zh/configure/app/html/template-parameters-by-entries.mdx +1 -1
- package/docs/zh/configure/app/html/template-parameters.mdx +1 -1
- package/docs/zh/configure/app/html/template.mdx +1 -1
- package/docs/zh/configure/app/html/title-by-entries.mdx +1 -1
- package/docs/zh/configure/app/html/title.mdx +1 -1
- package/docs/zh/configure/app/output/asset-prefix.mdx +1 -1
- package/docs/zh/configure/app/output/assets-retry.mdx +1 -1
- package/docs/zh/configure/app/output/charset.mdx +1 -1
- package/docs/zh/configure/app/output/clean-dist-path.mdx +1 -1
- package/docs/zh/configure/app/output/convert-to-rem.mdx +1 -1
- package/docs/zh/configure/app/output/copy.mdx +1 -1
- package/docs/zh/configure/app/output/css-module-local-ident-name.mdx +1 -1
- package/docs/zh/configure/app/output/css-modules.mdx +1 -1
- package/docs/zh/configure/app/output/data-uri-limit.mdx +1 -1
- package/docs/zh/configure/app/output/disable-css-extract.mdx +1 -1
- package/docs/zh/configure/app/output/disable-css-module-extension.mdx +1 -1
- package/docs/zh/configure/app/output/disable-filename-hash.mdx +1 -1
- package/docs/zh/configure/app/output/disable-inline-runtime-chunk.mdx +1 -1
- package/docs/zh/configure/app/output/disable-minimize.mdx +1 -1
- package/docs/zh/configure/app/output/disable-node-polyfill.mdx +1 -1
- package/docs/zh/configure/app/output/disable-source-map.mdx +1 -1
- package/docs/zh/configure/app/output/disable-svgr.mdx +1 -1
- package/docs/zh/configure/app/output/disable-ts-checker.mdx +1 -1
- package/docs/zh/configure/app/output/dist-path.mdx +1 -1
- package/docs/zh/configure/app/output/enable-asset-fallback.mdx +1 -1
- package/docs/zh/configure/app/output/enable-asset-manifest.mdx +1 -1
- package/docs/zh/configure/app/output/enable-css-module-tsdeclaration.mdx +1 -1
- package/docs/zh/configure/app/output/enable-inline-route-manifests.mdx +1 -1
- package/docs/zh/configure/app/output/enable-inline-scripts.mdx +1 -1
- package/docs/zh/configure/app/output/enable-inline-styles.mdx +1 -1
- package/docs/zh/configure/app/output/enable-latest-decorators.mdx +1 -1
- package/docs/zh/configure/app/output/externals.mdx +1 -1
- package/docs/zh/configure/app/output/filename-hash.mdx +1 -1
- package/docs/zh/configure/app/output/filename.mdx +1 -1
- package/docs/zh/configure/app/output/legal-comments.mdx +1 -1
- package/docs/zh/configure/app/output/override-browserslist.mdx +1 -1
- package/docs/zh/configure/app/output/polyfill.mdx +1 -1
- package/docs/zh/configure/app/output/splitRouteChunks.mdx +1 -1
- package/docs/zh/configure/app/output/ssg.mdx +1 -1
- package/docs/zh/configure/app/output/svg-default-export.mdx +1 -1
- package/docs/zh/configure/app/output/temp-dir.mdx +1 -1
- package/docs/zh/configure/app/performance/build-cache.mdx +1 -1
- package/docs/zh/configure/app/performance/bundle-analyze.mdx +1 -1
- package/docs/zh/configure/app/performance/chunk-split.mdx +1 -1
- package/docs/zh/configure/app/performance/dns-prefetch.mdx +1 -1
- package/docs/zh/configure/app/performance/preconnect.mdx +1 -1
- package/docs/zh/configure/app/performance/prefetch.mdx +1 -1
- package/docs/zh/configure/app/performance/preload.mdx +1 -1
- package/docs/zh/configure/app/performance/print-file-size.mdx +1 -1
- package/docs/zh/configure/app/performance/profile.mdx +1 -1
- package/docs/zh/configure/app/performance/remove-console.mdx +1 -1
- package/docs/zh/configure/app/performance/remove-moment-locale.mdx +1 -1
- package/docs/zh/configure/app/performance/transform-lodash.mdx +1 -1
- package/docs/zh/configure/app/plugins.mdx +1 -1
- package/docs/zh/configure/app/runtime/{intro.mdx → 0-intro.mdx} +1 -1
- package/docs/zh/configure/app/runtime/master-app.mdx +1 -1
- package/docs/zh/configure/app/runtime/router.mdx +3 -1
- package/docs/zh/configure/app/runtime/state.mdx +1 -1
- package/docs/zh/configure/app/security/check-syntax.mdx +1 -1
- package/docs/zh/configure/app/security/nonce.mdx +1 -1
- package/docs/zh/configure/app/security/sri.mdx +1 -1
- package/docs/zh/configure/app/server/base-url.mdx +1 -1
- package/docs/zh/configure/app/server/enable-framework-ext.mdx +1 -1
- package/docs/zh/configure/app/server/port.mdx +1 -1
- package/docs/zh/configure/app/server/public-routes.mdx +1 -1
- package/docs/zh/configure/app/server/routes.mdx +1 -1
- package/docs/zh/configure/app/server/ssr-by-entries.mdx +1 -1
- package/docs/zh/configure/app/server/ssr.mdx +1 -1
- package/docs/zh/configure/app/source/alias-strategy.mdx +1 -1
- package/docs/zh/configure/app/source/alias.mdx +1 -1
- package/docs/zh/configure/app/source/config-dir.mdx +1 -1
- package/docs/zh/configure/app/source/decorators.mdx +1 -1
- package/docs/zh/configure/app/source/define.mdx +1 -1
- package/docs/zh/configure/app/source/disable-default-entries.mdx +1 -1
- package/docs/zh/configure/app/source/disable-entry-dirs.mdx +1 -1
- package/docs/zh/configure/app/source/enable-async-entry.mdx +1 -1
- package/docs/zh/configure/app/source/enable-custom-entry.mdx +1 -1
- package/docs/zh/configure/app/source/entries-dir.mdx +1 -1
- package/docs/zh/configure/app/source/entries.mdx +1 -1
- package/docs/zh/configure/app/source/exclude.mdx +1 -1
- package/docs/zh/configure/app/source/global-vars.mdx +1 -1
- package/docs/zh/configure/app/source/include.mdx +1 -1
- package/docs/zh/configure/app/source/mainEntryName.mdx +1 -1
- package/docs/zh/configure/app/source/module-scopes.mdx +1 -1
- package/docs/zh/configure/app/source/pre-entry.mdx +1 -1
- package/docs/zh/configure/app/source/resolve-extension-prefix.mdx +1 -1
- package/docs/zh/configure/app/source/resolve-main-fields.mdx +1 -1
- package/docs/zh/configure/app/source/transform-import.mdx +1 -1
- package/docs/zh/configure/app/tools/autoprefixer.mdx +1 -1
- package/docs/zh/configure/app/tools/babel.mdx +1 -1
- package/docs/zh/configure/app/tools/bundler-chain.mdx +1 -1
- package/docs/zh/configure/app/tools/css-extract.mdx +1 -1
- package/docs/zh/configure/app/tools/css-loader.mdx +1 -1
- package/docs/zh/configure/app/tools/dev-server.mdx +1 -1
- package/docs/zh/configure/app/tools/esbuild.mdx +2 -2
- package/docs/zh/configure/app/tools/html-plugin.mdx +1 -1
- package/docs/zh/configure/app/tools/less.mdx +1 -1
- package/docs/zh/configure/app/tools/minify-css.mdx +1 -1
- package/docs/zh/configure/app/tools/postcss.mdx +1 -1
- package/docs/zh/configure/app/tools/pug.mdx +1 -1
- package/docs/zh/configure/app/tools/rspack.mdx +1 -1
- package/docs/zh/configure/app/tools/sass.mdx +1 -1
- package/docs/zh/configure/app/tools/style-loader.mdx +1 -1
- package/docs/zh/configure/app/tools/styled-components.mdx +1 -1
- package/docs/zh/configure/app/tools/swc.mdx +2 -2
- package/docs/zh/configure/app/tools/tailwindcss.mdx +1 -1
- package/docs/zh/configure/app/tools/terser.mdx +1 -1
- package/docs/zh/configure/app/tools/ts-checker.mdx +1 -1
- package/docs/zh/configure/app/tools/ts-loader.mdx +1 -1
- package/docs/zh/configure/app/tools/webpack-chain.mdx +1 -1
- package/docs/zh/configure/app/tools/webpack.mdx +1 -1
- package/docs/zh/guides/_meta.json +38 -0
- package/docs/zh/guides/advanced-features/_meta.json +26 -0
- package/docs/zh/guides/advanced-features/bff/_meta.json +6 -0
- package/docs/zh/guides/advanced-features/rsbuild-plugin.mdx +9 -9
- package/docs/zh/guides/advanced-features/ssr/_meta.json +5 -0
- package/docs/zh/guides/basic-features/_meta.json +22 -0
- package/docs/zh/guides/basic-features/data/_meta.json +4 -0
- package/docs/zh/guides/basic-features/mock.mdx +1 -1
- package/docs/zh/guides/concept/_meta.json +4 -0
- package/docs/zh/guides/get-started/_meta.json +7 -0
- package/docs/zh/guides/get-started/quick-start.mdx +2 -2
- package/docs/zh/guides/get-started/upgrade.mdx +1 -1
- package/docs/zh/guides/rsbuild-plugins/plugin-esbuild.mdx +201 -0
- package/docs/zh/guides/rsbuild-plugins/plugin-swc.mdx +344 -0
- package/docs/zh/guides/topic-detail/_meta.json +26 -0
- package/docs/zh/guides/topic-detail/framework-plugin/_meta.json +10 -0
- package/docs/zh/guides/topic-detail/generator/_meta.json +17 -0
- package/docs/zh/guides/topic-detail/generator/create/_meta.json +5 -0
- package/docs/zh/guides/topic-detail/generator/new/_meta.json +5 -0
- package/docs/zh/guides/topic-detail/generator/plugin/_meta.json +11 -0
- package/docs/zh/guides/topic-detail/model/_meta.json +14 -0
- package/docs/zh/guides/troubleshooting/_meta.json +6 -0
- package/docs/zh/guides/troubleshooting/dependencies.mdx +4 -4
- package/docs/zh/tutorials/_meta.json +17 -0
- package/i18n.json +110 -0
- package/package.json +9 -10
- package/rspress.config.ts +3 -20
- package/src/components/ContentCard/index.tsx +1 -1
- package/src/components/FeatureLayout/index.tsx +1 -1
- package/src/components/Footer/index.tsx +2 -2
- package/src/components/ListCard/index.tsx +1 -1
- package/src/components/Sandpack/index.tsx +4 -2
- package/src/components/SecondaryTitle/index.tsx +1 -1
- package/src/i18n/zhCN.ts +1 -1
- package/src/index.ts +0 -1
- package/src/pages/index.tsx +13 -5
- package/docs/en/apis/app/hooks/_category_.json +0 -5
- package/docs/en/apis/app/hooks/api/_category_.json +0 -4
- package/docs/en/apis/app/hooks/config/_category_.json +0 -4
- package/docs/en/apis/app/hooks/server/_category_.json +0 -4
- package/docs/en/apis/app/hooks/src/_category_.json +0 -4
- package/docs/en/apis/app/runtime/_category_.json +0 -5
- package/docs/en/apis/app/runtime/app/_category_.json +0 -4
- package/docs/en/apis/app/runtime/bff/_category_.json +0 -4
- package/docs/en/apis/app/runtime/core/_category_.json +0 -5
- package/docs/en/apis/app/runtime/model/_category_.json +0 -4
- package/docs/en/apis/app/runtime/router/_category_.json +0 -4
- package/docs/en/apis/app/runtime/ssr/_category_.json +0 -4
- package/docs/en/apis/app/runtime/utility/_category_.json +0 -4
- package/docs/en/apis/app/runtime/web-server/_category_.json +0 -4
- package/docs/en/community/blog/_category_.json +0 -6
- package/docs/en/configure/app/bff/_category_.json +0 -4
- package/docs/en/configure/app/deploy/_category_.json +0 -4
- package/docs/en/configure/app/dev/_category_.json +0 -4
- package/docs/en/configure/app/experiments/_category_.json +0 -4
- package/docs/en/configure/app/html/_category_.json +0 -4
- package/docs/en/configure/app/output/_category_.json +0 -4
- package/docs/en/configure/app/performance/_category_.json +0 -4
- package/docs/en/configure/app/runtime/_category_.json +0 -4
- package/docs/en/configure/app/security/_category_.json +0 -4
- package/docs/en/configure/app/server/_category_.json +0 -4
- package/docs/en/configure/app/source/_category_.json +0 -4
- package/docs/en/configure/app/tools/_category_.json +0 -4
- package/docs/en/guides/advanced-features/_category_.json +0 -5
- package/docs/en/guides/advanced-features/bff/_category_.json +0 -8
- package/docs/en/guides/advanced-features/ssr/_category_.json +0 -8
- package/docs/en/guides/basic-features/_category_.json +0 -5
- package/docs/en/guides/basic-features/data/_category_.json +0 -4
- package/docs/en/guides/concept/_category_.json +0 -5
- package/docs/en/guides/get-started/_category_.json +0 -5
- package/docs/en/guides/topic-detail/_category_.json +0 -5
- package/docs/en/guides/topic-detail/framework-plugin/_category_.json +0 -4
- package/docs/en/guides/topic-detail/generator/_category_.json +0 -4
- package/docs/en/guides/topic-detail/generator/create/_category_.json +0 -4
- package/docs/en/guides/topic-detail/generator/new/_category_.json +0 -4
- package/docs/en/guides/topic-detail/generator/plugin/_category_.json +0 -4
- package/docs/en/guides/topic-detail/generator/plugin/api/_category_.json +0 -4
- package/docs/en/guides/topic-detail/micro-frontend/_category_.json +0 -4
- package/docs/en/guides/topic-detail/model/_category_.json +0 -4
- package/docs/en/guides/troubleshooting/_category_.json +0 -5
- package/docs/en/tutorials/examples/_category_.json +0 -5
- package/docs/en/tutorials/first-app/_category_.json +0 -5
- package/docs/en/tutorials/foundations/_category_.json +0 -5
- package/docs/zh/apis/app/hooks/_category_.json +0 -5
- package/docs/zh/apis/app/hooks/api/_category_.json +0 -4
- package/docs/zh/apis/app/hooks/config/_category_.json +0 -4
- package/docs/zh/apis/app/hooks/server/_category_.json +0 -4
- package/docs/zh/apis/app/hooks/src/_category_.json +0 -4
- package/docs/zh/apis/app/runtime/_category_.json +0 -5
- package/docs/zh/apis/app/runtime/app/_category_.json +0 -4
- package/docs/zh/apis/app/runtime/bff/_category_.json +0 -4
- package/docs/zh/apis/app/runtime/core/_category_.json +0 -4
- package/docs/zh/apis/app/runtime/model/_category_.json +0 -4
- package/docs/zh/apis/app/runtime/router/_category_.json +0 -4
- package/docs/zh/apis/app/runtime/ssr/_category_.json +0 -4
- package/docs/zh/apis/app/runtime/utility/_category_.json +0 -4
- package/docs/zh/apis/app/runtime/web-server/_category_.json +0 -4
- package/docs/zh/community/blog/_category_.json +0 -6
- package/docs/zh/configure/app/bff/_category_.json +0 -4
- package/docs/zh/configure/app/deploy/_category_.json +0 -4
- package/docs/zh/configure/app/dev/_category_.json +0 -4
- package/docs/zh/configure/app/experiments/_category_.json +0 -4
- package/docs/zh/configure/app/html/_category_.json +0 -4
- package/docs/zh/configure/app/output/_category_.json +0 -4
- package/docs/zh/configure/app/performance/_category_.json +0 -4
- package/docs/zh/configure/app/runtime/_category_.json +0 -4
- package/docs/zh/configure/app/security/_category_.json +0 -4
- package/docs/zh/configure/app/server/_category_.json +0 -4
- package/docs/zh/configure/app/source/_category_.json +0 -4
- package/docs/zh/configure/app/tools/_category_.json +0 -4
- package/docs/zh/guides/advanced-features/_category_.json +0 -5
- package/docs/zh/guides/advanced-features/bff/_category_.json +0 -8
- package/docs/zh/guides/advanced-features/ssr/_category_.json +0 -8
- package/docs/zh/guides/basic-features/_category_.json +0 -5
- package/docs/zh/guides/basic-features/data/_category_.json +0 -4
- package/docs/zh/guides/concept/_category_.json +0 -5
- package/docs/zh/guides/get-started/_category_.json +0 -5
- package/docs/zh/guides/topic-detail/_category_.json +0 -5
- package/docs/zh/guides/topic-detail/framework-plugin/_category_.json +0 -4
- package/docs/zh/guides/topic-detail/generator/_category_.json +0 -4
- package/docs/zh/guides/topic-detail/generator/create/_category_.json +0 -4
- package/docs/zh/guides/topic-detail/generator/new/_category_.json +0 -4
- package/docs/zh/guides/topic-detail/generator/plugin/_category_.json +0 -4
- package/docs/zh/guides/topic-detail/generator/plugin/api/_category_.json +0 -4
- package/docs/zh/guides/topic-detail/micro-frontend/_category_.json +0 -4
- package/docs/zh/guides/topic-detail/model/_category_.json +0 -4
- package/docs/zh/guides/troubleshooting/_category_.json +0 -5
- package/docs/zh/tutorials/examples/_category_.json +0 -5
- package/docs/zh/tutorials/first-app/_category_.json +0 -5
- package/docs/zh/tutorials/foundations/_category_.json +0 -5
- package/src/.eslintrc.json +0 -3
- /package/docs/zh/guides/{deprecat.md → deprecated.md} +0 -0
@@ -0,0 +1,26 @@
|
|
1
|
+
[
|
2
|
+
"rspack-start",
|
3
|
+
{
|
4
|
+
"type": "dir",
|
5
|
+
"name": "bff",
|
6
|
+
"label": "use-bff",
|
7
|
+
"collapsed": true
|
8
|
+
},
|
9
|
+
"code-split",
|
10
|
+
{
|
11
|
+
"type": "dir",
|
12
|
+
"name": "ssr",
|
13
|
+
"label": "use-ssr",
|
14
|
+
"collapsed": true
|
15
|
+
},
|
16
|
+
"ssg",
|
17
|
+
"compatibility",
|
18
|
+
"eslint",
|
19
|
+
"low-level",
|
20
|
+
"source-build",
|
21
|
+
"build-performance",
|
22
|
+
"inline-assets",
|
23
|
+
"optimize-bundle",
|
24
|
+
"using-storybook",
|
25
|
+
"web-server"
|
26
|
+
]
|
@@ -28,19 +28,19 @@ If your current version is lower than MAJOR_VERSION.46.0, you can upgrade by exe
|
|
28
28
|
|
29
29
|
Here are the official Rsbuild plugins built into Modern.js:
|
30
30
|
|
31
|
-
| Plugin Name
|
32
|
-
|
|
33
|
-
| [React Plugin](https://rsbuild.dev/plugins/list/plugin-react)
|
34
|
-
| [SVGR Plugin](https://rsbuild.dev/plugins/list/plugin-svgr)
|
35
|
-
| [Styled Components Plugin](https://
|
36
|
-
| [Assets Retry Plugin](https://rsbuild.dev/plugins/list/plugin-assets-retry)
|
37
|
-
| [Type Check Plugin](https://rsbuild.dev/plugins/list/plugin-type-check)
|
31
|
+
| Plugin Name | Introduce | Modern.js Link |
|
32
|
+
| ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------- |
|
33
|
+
| [React Plugin](https://rsbuild.dev/plugins/list/plugin-react) | Provides support for React | - |
|
34
|
+
| [SVGR Plugin](https://rsbuild.dev/plugins/list/plugin-svgr) | Support convert SVG to React components | [output.disableSvgr](/configure/app/output/disable-svgr)<br />[output.svgDefaultExport](/configure/app/output/svg-default-export) |
|
35
|
+
| [Styled Components Plugin](https://github.com/rspack-contrib/rsbuild-plugin-styled-components) | Provides compile-time support for styled-components | [tools.styledComponents](/configure/app/tools/styled-components.html) |
|
36
|
+
| [Assets Retry Plugin](https://rsbuild.dev/plugins/list/plugin-assets-retry) | Used to automatically resend requests when static assets fail to load | [output.assetsRetry](/configure/app/output/assets-retry.html) |
|
37
|
+
| [Type Check Plugin](https://rsbuild.dev/plugins/list/plugin-type-check) | Used to run TypeScript type checker on a separate process | [output.disableTsChecker](/configure/app/output/disable-ts-checker.html)<br />[tools.tsChecker](/configure/app/tools/ts-checker.html) |
|
38
38
|
| [Node Polyfill Plugin](https://github.com/rspack-contrib/rsbuild-plugin-node-polyfill) | Used to inject polyfills of Node core modules in the browser side | [output.disableNodePolyfill](/configure/app/output/disable-node-polyfill.html) |
|
39
|
-
| [Source Build Plugin](https://
|
39
|
+
| [Source Build Plugin](https://github.com/rspack-contrib/rsbuild-plugin-source-build) | Supports referencing source code from other subdirectories | [experiments.sourceBuild](/configure/app/experiments/source-build.html) |
|
40
40
|
| [Check Syntax Plugin](https://github.com/rspack-contrib/rsbuild-plugin-check-syntax) | Used to analyze the syntax compatibility of artifacts | [security.checkSyntax](/configure/app/security/check-syntax.html) |
|
41
41
|
| [CSS Minimizer Plugin](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer) | Used to customize CSS minimizer, switch to [cssnano](https://cssnano.co/) or other tools for CSS compression | [tools.minifyCss](/configure/app/tools/minify-css.html) |
|
42
42
|
| [Pug Plugin](https://github.com/rspack-contrib/rsbuild-plugin-pug) | Provides support for the Pug template engine | [tools.pug](/configure/app/tools/pug.html) |
|
43
|
-
| [Rem Plugin](https://
|
43
|
+
| [Rem Plugin](https://github.com/rspack-contrib/rsbuild-plugin-rem) | Implements the rem adaptive layout for mobile pages | [output.convertToRem](/configure/app/output/convert-to-rem.html) |
|
44
44
|
| [YAML Plugin](https://github.com/rspack-contrib/rsbuild-plugin-yaml) | Used to import YAML files and convert them into JavaScript objects | [TOML File](/guides/basic-features/json-files.html#toml-file) |
|
45
45
|
| [TOML Plugin](https://github.com/rspack-contrib/rsbuild-plugin-toml) | Used to import TOML files and convert them into JavaScript objects | [YAML File](/guides/basic-features/json-files.html#yaml-file) |
|
46
46
|
|
@@ -0,0 +1,22 @@
|
|
1
|
+
[
|
2
|
+
"css",
|
3
|
+
"routes",
|
4
|
+
{
|
5
|
+
"type": "dir",
|
6
|
+
"name": "data",
|
7
|
+
"label": "data-solution",
|
8
|
+
"collapsed": true
|
9
|
+
},
|
10
|
+
"alias",
|
11
|
+
"mock",
|
12
|
+
"proxy",
|
13
|
+
"env-vars",
|
14
|
+
"html",
|
15
|
+
"output-files",
|
16
|
+
"static-assets",
|
17
|
+
"svg-assets",
|
18
|
+
"json-files",
|
19
|
+
"wasm-assets",
|
20
|
+
"css-modules",
|
21
|
+
"deploy"
|
22
|
+
]
|
@@ -93,7 +93,7 @@ $ pnpm run build
|
|
93
93
|
|
94
94
|
> modern build
|
95
95
|
|
96
|
-
Modern.js Framework
|
96
|
+
Modern.js Framework
|
97
97
|
|
98
98
|
info Starting production build...
|
99
99
|
info Type checker is enabled. It may take some time.
|
@@ -141,7 +141,7 @@ $ pnpm run serve
|
|
141
141
|
|
142
142
|
> modern serve
|
143
143
|
|
144
|
-
Modern.js Framework
|
144
|
+
Modern.js Framework
|
145
145
|
|
146
146
|
info Starting production server...
|
147
147
|
|
@@ -0,0 +1,205 @@
|
|
1
|
+
---
|
2
|
+
sidebar_position: 3
|
3
|
+
---
|
4
|
+
|
5
|
+
# Esbuild Plugin
|
6
|
+
|
7
|
+
:::warning
|
8
|
+
**The esbuild feature in the current document is no longer maintained**, we recommend using the Rspack + SWC solution, because Rspack + SWC provide better build performance, richer features, and better compatibility.
|
9
|
+
|
10
|
+
Please refer to [「Use Rspack」](guides/advanced-features/rspack-start) for more information.
|
11
|
+
|
12
|
+
:::
|
13
|
+
|
14
|
+
import Esbuild from '@modern-js/builder-doc/docs/en/shared/esbuild.md';
|
15
|
+
|
16
|
+
<Esbuild />
|
17
|
+
|
18
|
+
## Quick Start
|
19
|
+
|
20
|
+
### Used in Modern.js framework
|
21
|
+
|
22
|
+
The Modern.js framework integrates the Builder's esbuild plugin by default, so you don't need to manually install and register the plugin, just use the [tools.esbuild](https://modernjs.dev/en/configure/app/tools/esbuild.html) configuration:
|
23
|
+
|
24
|
+
```js
|
25
|
+
export default defineConfig({
|
26
|
+
tools: {
|
27
|
+
esbuild: {
|
28
|
+
loader: {
|
29
|
+
target: 'chrome61',
|
30
|
+
},
|
31
|
+
minimize: {
|
32
|
+
target: 'chrome61',
|
33
|
+
},
|
34
|
+
},
|
35
|
+
},
|
36
|
+
});
|
37
|
+
```
|
38
|
+
|
39
|
+
## Config
|
40
|
+
|
41
|
+
The plugin will enable code transformation and minification by default. You can also customize the behavior of the plugin through configuration.
|
42
|
+
|
43
|
+
### loader
|
44
|
+
|
45
|
+
- **Type:**
|
46
|
+
|
47
|
+
```ts
|
48
|
+
type LoaderOptions = EsbuildLoaderOptions | false | undefined;
|
49
|
+
```
|
50
|
+
|
51
|
+
- **Default:**
|
52
|
+
|
53
|
+
```ts
|
54
|
+
const defaultOptions = {
|
55
|
+
target: 'es2015',
|
56
|
+
charset: builderConfig.output.charset,
|
57
|
+
};
|
58
|
+
```
|
59
|
+
|
60
|
+
This config is used to enable JavaScript/TypeScript transformation, which will replace babel-loader and ts-loader with esbuild-loader.
|
61
|
+
|
62
|
+
If you want to modify the options, you can check the [esbuild-loader documentation](https://github.com/privatenumber/esbuild-loader#loader).
|
63
|
+
|
64
|
+
#### Set JSX Format
|
65
|
+
|
66
|
+
When using esbuild for transformation, esbuild will read the `compilerOptions.jsx` field in `tsconfig.json` to determine which JSX syntax to use.
|
67
|
+
|
68
|
+
Therefore, you need to set the correct JSX syntax in `tsconfig.json`.
|
69
|
+
|
70
|
+
For example, React projects need to set `compilerOptions.jsx` to `react-jsx`:
|
71
|
+
|
72
|
+
```json
|
73
|
+
{
|
74
|
+
"compilerOptions": {
|
75
|
+
"jsx": "react-jsx"
|
76
|
+
}
|
77
|
+
}
|
78
|
+
```
|
79
|
+
|
80
|
+
#### Set the target environment
|
81
|
+
|
82
|
+
Use the `target` option to set the target environment for transformation. `target` can be set directly to the JavaScript language version, such as `es6`, `es2020`; it can also be set to several target environments, each target environment is an environment name followed by a version number, such as `['chrome58', 'edge16' ,'firefox57']`. For a detailed introduction of the `target` option, please refer to [esbuild - target](https://esbuild.github.io/api/#target).
|
83
|
+
|
84
|
+
target supports setting to the following environments:
|
85
|
+
|
86
|
+
- chrome
|
87
|
+
- edge
|
88
|
+
- firefox
|
89
|
+
- ie
|
90
|
+
- ios
|
91
|
+
- node
|
92
|
+
- opera
|
93
|
+
- safari
|
94
|
+
|
95
|
+
```ts
|
96
|
+
builderPluginEsbuild({
|
97
|
+
loader: {
|
98
|
+
target: 'chrome61',
|
99
|
+
},
|
100
|
+
});
|
101
|
+
```
|
102
|
+
|
103
|
+
#### Disable transformation
|
104
|
+
|
105
|
+
Set `loader` to `false` to disable esbuild transformation, and Builder will continue to use Babel to transform the code.
|
106
|
+
|
107
|
+
```ts
|
108
|
+
builderPluginEsbuild({
|
109
|
+
loader: false,
|
110
|
+
});
|
111
|
+
```
|
112
|
+
|
113
|
+
### minimize
|
114
|
+
|
115
|
+
- **Type:**
|
116
|
+
|
117
|
+
```ts
|
118
|
+
type MinimizeOptions = EsbuildMinifyOptions | false | undefined;
|
119
|
+
```
|
120
|
+
|
121
|
+
- **Default:**
|
122
|
+
|
123
|
+
```ts
|
124
|
+
const defaultOptions = {
|
125
|
+
css: true,
|
126
|
+
target: 'es2015',
|
127
|
+
format: builderTarget === 'web' ? 'iife' : undefined,
|
128
|
+
};
|
129
|
+
```
|
130
|
+
|
131
|
+
This option is used to enable minification for JavaScript and CSS.
|
132
|
+
|
133
|
+
If you want to modify the options, you can check the [esbuild-loader documentation](https://github.com/privatenumber/esbuild-loader#minifyplugin).
|
134
|
+
|
135
|
+
#### Set the target environment
|
136
|
+
|
137
|
+
Use the `target` option to set the target environment for minification.
|
138
|
+
|
139
|
+
```ts
|
140
|
+
builderPluginEsbuild({
|
141
|
+
minimize: {
|
142
|
+
target: 'chrome61',
|
143
|
+
},
|
144
|
+
});
|
145
|
+
```
|
146
|
+
|
147
|
+
#### Disable minification
|
148
|
+
|
149
|
+
Set `minimize` to `false` to disable esbuild minification, and Builder will continue to use Terser to minify the code.
|
150
|
+
|
151
|
+
```ts
|
152
|
+
builderPluginEsbuild({
|
153
|
+
minimize: false,
|
154
|
+
});
|
155
|
+
```
|
156
|
+
|
157
|
+
## Limitations
|
158
|
+
|
159
|
+
Although esbuild can significantly improve the build performance of existing webpack projects, it still has certain limitations that require special attention.
|
160
|
+
|
161
|
+
### Compatibility
|
162
|
+
|
163
|
+
As a compiler (i.e. `loader` capability), esbuild usually supports at least ES2015 (that is, ES6) syntax, and does not have the ability to automatically inject Polyfill.. If the production environment needs to downgrade to ES5 and below syntax, it is recommended to use SWC compilation.
|
164
|
+
|
165
|
+
You can specify the target syntax version by following config:
|
166
|
+
|
167
|
+
```ts
|
168
|
+
builderPluginEsbuild({
|
169
|
+
loader: {
|
170
|
+
target: 'es2015',
|
171
|
+
},
|
172
|
+
});
|
173
|
+
```
|
174
|
+
|
175
|
+
As a code minify tool (i.e. `minimize` capability), esbuild can minify the code in production environment, and usually supports ES2015 syntax at least.
|
176
|
+
|
177
|
+
If you set the compressed `target` to `es5`, you need to ensure that all codes have been compiled to ES5 codes, otherwise it will cause esbuild compilation error: `Transforming 'xxx' to the configured target environment ("es5") is not supported yet `.
|
178
|
+
|
179
|
+
Therefore, for projects that need to be compatible with ES5 and below syntax in the production environment, please be careful to enable the minimize capability, and it is recommended to use SWC compression.
|
180
|
+
|
181
|
+
You can specify the target syntax version by following config:
|
182
|
+
|
183
|
+
```js
|
184
|
+
builderPluginEsbuild({
|
185
|
+
minimize: {
|
186
|
+
target: 'es2015',
|
187
|
+
},
|
188
|
+
});
|
189
|
+
```
|
190
|
+
|
191
|
+
:::danger Caution
|
192
|
+
Projects that need to be compatible with ES5 and below syntax in the production environment need to be careful to turn on the minimize config.
|
193
|
+
:::
|
194
|
+
|
195
|
+
### Not support Babel plugins
|
196
|
+
|
197
|
+
As a compiler, the syntax transformation function of the original Babel plugins such as `babel-plugin-import` is not available after esbuild is turned on. And since the bottom layer of the plugin uses esbuild's `Transform API`, it does not support esbuild plugins to customize the compilation process.
|
198
|
+
|
199
|
+
If you have requirements related to Babel plugins such as `babel-plugin-import`, you can use the SWC plugin.
|
200
|
+
|
201
|
+
### Bundle Size
|
202
|
+
|
203
|
+
Although the compression speed of esbuild is faster, the compression ratio of esbuild is lower than that of terser, so the bundle size will increase, please use it according to the scenes. Generally speaking, esbuild is more suitable for scenes that are not sensitive to bundle size.
|
204
|
+
|
205
|
+
You can refer to [minification-benchmarks](https://github.com/privatenumber/minification-benchmarks) for a detailed comparison between minimizers.
|