web-infra-dev / rspack

The fast Rust-based web bundler with webpack-compatible API 🦀️
https://rspack.dev
MIT License
10.13k stars 575 forks source link

[Feature]: add chunksSortMode for HtmlRspackPlugin #8533

Open LiuKanShanKanLiu opened 3 hours ago

LiuKanShanKanLiu commented 3 hours ago

What problem does this feature solve?

Currently, chunks in my project have a certain dependency order, I used to use webpack's html-webpack-plugin in webpack , that works fine

What does the proposed API of configuration look like?

new rspack.HtmlRspackPlugin({ chunks: [ // "js/crmPackages", // "js/crmCommon", "js/common", "js/main", // "js/email-config", "js/worker" // nodeNev === "development" ? "worker" : "/page/worker" ], template: "./src/viewsHtml/admin/home/index.html", filename: "viewsHtml/admin/home/index.html", inject: true, chunksSortMode: "manual",})