rspack
rspack copied to clipboard
[Feature]: CopyRspackPlugin 如何实现 copy-webpack-plugin 的 transform 方法
What problem does this feature solve?
目前CopyRspackPlugin没有支持transform方法,请问有相关的安排吗
What does the proposed API of configuration look like?
type transform = | { transformer: (input: string, absoluteFilename: string) => string | Buffer; cache?: boolean | TransformerCacheObject | undefined; } | ((input: string, absoluteFilename: string) => string | Buffer);
Because that's function type, previously we have lots of function type APIs not implemented, if you are willing to contribute, you can refer to a similar API, splitChunks.chunks here https://github.com/web-infra-dev/rspack/blob/c7024196b5f4f394d2294a093cbb52c3d200f848/crates/rspack_binding_options/src/options/raw_split_chunks/raw_split_chunk_chunks.rs#L23. But using js function will slow down the build
This issue has been automatically marked as stale because it has not had recent activity. If this issue is still affecting you, please leave any comment (for example, "bump"). We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!
Supported in https://github.com/web-infra-dev/rspack/pull/6375