Skip to content

Commit 1856e90

Browse files
chore(deps): update dependency @swc/plugin-prefresh to v12 (#46)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: neverland <chenjiahan.jait@bytedance.com>
1 parent 3c50723 commit 1856e90

File tree

18 files changed

+168
-415
lines changed

18 files changed

+168
-415
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@
4646
"@prefresh/core": "^1.5.9",
4747
"@prefresh/utils": "^1.2.1",
4848
"@rslib/core": "^0.19.4",
49-
"@rspack/core": "npm:@rspack-canary/core@1.5.8-canary-f37fe028-20250928065933",
49+
"@rspack/core": "^1.7.4",
5050
"@rspack/test-tools": "1.7.4",
5151
"wast-loader": "^1.14.1",
5252
"@rstest/core": "^0.8.1",
5353
"@swc/helpers": "0.5.18",
54-
"@swc/plugin-prefresh": "^9.5.0",
54+
"@swc/plugin-prefresh": "^12.5.0",
5555
"@types/node": "^24.10.9",
5656
"cac": "^6.7.14",
5757
"cross-env": "^10.1.0",

pnpm-lock.yaml

Lines changed: 10 additions & 187 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,10 @@ class PreactRefreshRspackPlugin implements RspackPluginInstance {
121121
compiler.hooks.thisCompilation.tap(NAME, (compilation) => {
122122
compilation.hooks.runtimeModule.tap(NAME, (runtimeModule) => {
123123
// rspack does not have addRuntimeModule and runtimeRequirements on js side
124-
const name = runtimeModule.constructorName || runtimeModule.constructor?.name;
125-
if (
126-
name === 'HotModuleReplacementRuntimeModule'
127-
) {
124+
const name =
125+
// @ts-expect-error
126+
runtimeModule.constructorName || runtimeModule.constructor?.name;
127+
if (name === 'HotModuleReplacementRuntimeModule') {
128128
if (!runtimeModule.source) {
129129
throw new Error(
130130
'Can not get the original source of HotModuleReplacementRuntimeModule',

0 commit comments

Comments
 (0)