Skip to content

Commit

Permalink
fix(plugin-preact-refresh): missing plugin type (#6850)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjiahan authored Jun 18, 2024
1 parent 3e62ca4 commit a99a256
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Rspack 是一个基于 Rust 编写的高性能 JavaScript 打包工具,它提
- [react-refresh-webpack-plugin](https://github.com/pmmmwh/react-refresh-webpack-plugin) 项目(由 [@pmmmwh](https://github.com/pmmmwh) 创建),它启发了 Rspack 内的 ReactRefreshPlugin 实现。
- [prefresh](https://github.com/preactjs/prefresh) 项目(由 [@Jovi De Croock](https://github.com/JoviDeCroock) 创建),它启发了 Rspack 内的 PreactRefreshPlugin 实现。
- [mini-css-extract-plugin](https://github.com/webpack-contrib/mini-css-extract-plugin) 项目(由 [@sokra](https://github.com/sokra) 创建),它启发了 Rspack 内的 CssExtractPlugin 实现。
- [copy-webpack-plugin](https://github.com/webpack-contrib/copy-webpack-plugin) 项目(由 [@kevlened](https://github.com/kevlened) 创建),它启发了 Rsapck 内的 CopyPlugin 实现。
- [copy-webpack-plugin](https://github.com/webpack-contrib/copy-webpack-plugin) 项目(由 [@kevlened](https://github.com/kevlened) 创建),它启发了 Rspack 内的 CopyPlugin 实现。

## License

Expand Down
7 changes: 4 additions & 3 deletions packages/rspack-plugin-preact-refresh/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ const INTERNAL_PATHS = [

const runtimeSource = fs.readFileSync(RUNTIME_INTERCEPT_PATH, "utf-8");

const NAME = "PreactRefreshRsapckPlugin";
const NAME = "PreactRefreshRspackPlugin";

class PreactRefreshRsapckPlugin implements RspackPluginInstance {
class PreactRefreshRspackPlugin implements RspackPluginInstance {
name = NAME;

constructor(private options: IPreactRefreshRspackPluginOptions) {
Expand Down Expand Up @@ -117,4 +117,5 @@ class PreactRefreshRsapckPlugin implements RspackPluginInstance {
}
}

module.exports = PreactRefreshRsapckPlugin;
// @ts-expect-error output module.exports
export = PreactRefreshRspackPlugin;

2 comments on commit a99a256

@rspack-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Benchmark detail: Open

Name Base (2024-06-18 553f785) Current Change
10000_development-mode + exec 2.21 s ± 22 ms 2.24 s ± 42 ms +1.00 %
10000_development-mode_hmr + exec 737 ms ± 12 ms 721 ms ± 17 ms -2.22 %
10000_production-mode + exec 2.57 s ± 22 ms 2.59 s ± 47 ms +0.88 %
arco-pro_development-mode + exec 1.94 s ± 68 ms 1.92 s ± 86 ms -1.03 %
arco-pro_development-mode_hmr + exec 441 ms ± 2.1 ms 443 ms ± 0.99 ms +0.26 %
arco-pro_production-mode + exec 3.53 s ± 85 ms 3.57 s ± 189 ms +1.23 %
threejs_development-mode_10x + exec 1.46 s ± 11 ms 1.48 s ± 23 ms +1.26 %
threejs_development-mode_10x_hmr + exec 799 ms ± 3.3 ms 790 ms ± 8.1 ms -1.08 %
threejs_production-mode_10x + exec 4.76 s ± 33 ms 4.8 s ± 40 ms +0.79 %

@rspack-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Ran ecosystem CI: Open

suite result
modernjs ❌ failure
_selftest ✅ success
nx ❌ failure
rspress ✅ success
rsbuild ✅ success
compat ✅ success
examples ✅ success

Please sign in to comment.