Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: recommend using Rslib to reuse webpack plugins #6598

Merged
merged 1 commit into from
Dec 2, 2024
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
5 changes: 5 additions & 0 deletions .changeset/selfish-seahorses-care.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@modern-js/module-tools-docs': patch
---

docs: recommend using Rslib to reuse webpack plugins
4 changes: 1 addition & 3 deletions packages/document/module-doc/docs/en/guide/faq/basic.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,5 @@ Modern.js Module uses esbuild to build toolkits and component libraries, and Rsb
## Can Modern.js Module use webpack plugins or loaders?

Modern.js Module is based on esbuild for building and cannot use tools from the webpack-related ecosystem.
You can find more community plugins for esbuild [here](https://github.com/esbuild/community-plugins)

If the UMD product produced by Modern.js Module does not meet your requirements, you can use Rsbuild and add [UMD Plugin](https://github.com/rspack-contrib/rsbuild-plugin-umd) to build UMD products.

To allow reuse of the webpack and Rspack ecosystems, we have developed Rslib, which is the next generation library development tools that will provide better build performance and plugin ecosystem. You can refer to the [Rslib repository](https://github.com/web-infra-dev/rslib) for more information.
5 changes: 2 additions & 3 deletions packages/document/module-doc/docs/zh/guide/faq/basic.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@

Modern.js Module 使用 esbuild 构建工具库和组件库,Rsbuild 专注于解决 Web 应用构建场景。

## Modern.js Module 是否可以使用 webpack plugin 或者 loader?
## Modern.js Module 是否可以使用 webpack 插件或者 loader?

Modern.js Module 基于 esbuild 构建,无法使用 webpack 相关生态的工具。
[这里](https://github.com/esbuild/community-plugins)可以发现更多 esbuild 社区插件

如果 Modern.js Module 生产的 UMD 产物达不到你的要求,可以使用 Rsbuild 并添加 [UMD Plugin](https://github.com/rspack-contrib/rsbuild-plugin-umd) 构建 UMD 产物
为了允许复用 webpack 和 Rspack 的生态,我们已经基于 Rsbuild 开发了 Rslib,它是下一代的 library 开发工具,将提供更好的构建性能和插件生态,你可以参考 [Rslib 仓库](https://github.com/web-infra-dev/rslib) 了解更多信息