@peachy/plugin-react 0.0.11 → 0.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.mjs +3 -13
  2. package/package.json +4 -4
package/dist/index.mjs CHANGED
@@ -3,8 +3,7 @@ import { exactRegex, prefixRegex } from "rolldown/filter";
3
3
  import { readFileSync } from "fs";
4
4
  import remapping from "@ampproject/remapping";
5
5
  import MagicString from "magic-string";
6
- import { transform } from "rolldown/experimental";
7
-
6
+ import { transform } from "rolldown/utils";
8
7
  //#region src/entrypoint.ts
9
8
  function addHmrEntrypoint(input) {
10
9
  const PREFIX = "\0virtual:hmr-wrapper:";
@@ -43,7 +42,6 @@ function createHmrEntrypointPlugin() {
43
42
  }
44
43
  };
45
44
  }
46
-
47
45
  //#endregion
48
46
  //#region src/runtime.ts
49
47
  function hmrRuntimePlugin(port) {
@@ -64,7 +62,6 @@ function hmrRuntimePlugin(port) {
64
62
  }
65
63
  };
66
64
  }
67
-
68
65
  //#endregion
69
66
  //#region src/wrapper.ts
70
67
  function reactRefreshWrapperPlugin() {
@@ -87,12 +84,7 @@ function reactRefreshWrapperPlugin() {
87
84
  },
88
85
  sourcemap: true
89
86
  });
90
- for (const error of errors) this.error({
91
- frame: error.codeframe ?? void 0,
92
- message: error.message,
93
- cause: error.helpMessage,
94
- stack: ""
95
- });
87
+ for (const error of errors) this.error(error);
96
88
  const hmrId = JSON.stringify(id);
97
89
  const s = new MagicString(transformed);
98
90
  s.prepend(prefix.replaceAll("$hmrId$", hmrId));
@@ -109,7 +101,6 @@ function reactRefreshWrapperPlugin() {
109
101
  }
110
102
  };
111
103
  }
112
-
113
104
  //#endregion
114
105
  //#region src/index.ts
115
106
  function reactHMRPlugin(port) {
@@ -119,6 +110,5 @@ function reactHMRPlugin(port) {
119
110
  hmrRuntimePlugin(port)
120
111
  ];
121
112
  }
122
-
123
113
  //#endregion
124
- export { reactHMRPlugin };
114
+ export { reactHMRPlugin };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peachy/plugin-react",
3
- "version": "0.0.11",
3
+ "version": "0.0.12",
4
4
  "description": "HMR for react",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -16,9 +16,9 @@
16
16
  "react-refresh": "^0.18.0"
17
17
  },
18
18
  "devDependencies": {
19
- "@types/node": "^25.2.2",
20
- "rolldown": "1.0.0-rc.3",
21
- "tsdown": "0.20.3",
19
+ "@types/node": "^25.3.5",
20
+ "rolldown": "1.0.0-rc.7",
21
+ "tsdown": "0.21.0",
22
22
  "typescript": "^5.9.3",
23
23
  "@peachy/internal-utilities": "0.0.0"
24
24
  },