web-infra-dev / rspack

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

Plugin type incompatible with webpack plugin #5360

Open ahabhgk opened 5 months ago

ahabhgk commented 5 months ago

A workaround worth exploring (for the end user) is to use:

new HtmlWebpackPlugin() as unknown as RspackPluginInstance

but this feels a bit like a hack to me?

Originally posted by @wojtekmaj in https://github.com/web-infra-dev/rspack/issues/5005#issuecomment-1872075482

tjx666 commented 5 months ago

@rspack/cli doesn't export RspackPluginInstance by default, you need to use it like:

type RspackPluginInstance  = ReturnType<typeof definePlugin>
stale[bot] commented 3 months ago

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!

wojtekmaj commented 3 months ago

Bump

stale[bot] commented 1 month ago

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!