@taujs/react 0.0.3 → 0.0.5

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.
package/dist/index.js CHANGED
@@ -150,21 +150,19 @@ var createRenderStream = (serverResponse, { onHead, onFinish, onError }, {
150
150
  const { pipe } = renderToPipeableStream(appElement, {
151
151
  bootstrapModules: bootstrapModules ? [bootstrapModules] : void 0,
152
152
  onShellReady() {
153
- Promise.resolve(initialDataPromise).then((resolvedData) => {
154
- const dynamicHeadContent = resolveHeadContent(headContent, resolvedData);
155
- onHead(dynamicHeadContent);
156
- pipe(
157
- new Writable({
158
- write(chunk, _encoding, callback) {
159
- serverResponse.write(chunk, callback);
160
- },
161
- final(callback) {
162
- onFinish(store.getSnapshot());
163
- callback();
164
- }
165
- })
166
- );
167
- });
153
+ const dynamicHeadContent = resolveHeadContent(headContent, initialDataPromise);
154
+ onHead(dynamicHeadContent);
155
+ pipe(
156
+ new Writable({
157
+ write(chunk, _encoding, callback) {
158
+ serverResponse.write(chunk, callback);
159
+ },
160
+ final(callback) {
161
+ onFinish(store.getSnapshot());
162
+ callback();
163
+ }
164
+ })
165
+ );
168
166
  },
169
167
  onAllReady() {
170
168
  },
@@ -0,0 +1,6 @@
1
+ import react from '@vitejs/plugin-react';
2
+ import { PluginOption } from 'vite';
3
+
4
+ declare function pluginReact(opts?: Parameters<typeof react>[0]): PluginOption;
5
+
6
+ export { pluginReact };
package/dist/plugin.js ADDED
@@ -0,0 +1,8 @@
1
+ // src/plugin.ts
2
+ import react from "@vitejs/plugin-react";
3
+ function pluginReact(opts) {
4
+ return react(opts);
5
+ }
6
+ export {
7
+ pluginReact
8
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taujs/react",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "description": "taujs | τjs",
5
5
  "author": "Aoede <taujs@aoede.uk.net> (https://www.aoede.uk.net)",
6
6
  "license": "MIT",
@@ -29,17 +29,23 @@
29
29
  "import": "./dist/index.js",
30
30
  "types": "./dist/index.d.ts"
31
31
  },
32
+ "./plugin": {
33
+ "import": "./dist/plugin.js",
34
+ "types": "./dist/plugin.d.ts"
35
+ },
32
36
  "./package.json": "./package.json"
33
37
  },
34
38
  "files": [
35
39
  "dist"
36
40
  ],
41
+ "dependencies": {},
37
42
  "devDependencies": {
38
43
  "@arethetypeswrong/cli": "^0.15.4",
39
44
  "@babel/preset-typescript": "^7.24.7",
40
45
  "@changesets/cli": "^2.27.7",
41
46
  "@testing-library/dom": "^10.4.0",
42
47
  "@testing-library/react": "^16.1.0",
48
+ "@types/node": "^24.0.7",
43
49
  "@types/react": "^19.0.2",
44
50
  "@types/react-dom": "^19.0.2",
45
51
  "@vitest/coverage-v8": "^2.1.0",
@@ -55,6 +61,7 @@
55
61
  },
56
62
  "peerDependencies": {
57
63
  "@taujs/server": "^0.2.0",
64
+ "@vitejs/plugin-react": "^4.6.0",
58
65
  "react": "^19.0.0",
59
66
  "react-dom": "^19.0.0",
60
67
  "typescript": "^5.5.4",