@void/react 1.1.12 → 1.2.0
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/plugin.mjs +18 -7
- package/package.json +7 -7
package/dist/plugin.mjs
CHANGED
|
@@ -52,11 +52,14 @@ const REACT_OPTIMIZE_DEPS = [
|
|
|
52
52
|
"react",
|
|
53
53
|
"react/jsx-runtime",
|
|
54
54
|
"react/jsx-dev-runtime",
|
|
55
|
-
"react-dom"
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
"react-dom"
|
|
56
|
+
];
|
|
57
|
+
const CLIENT_OPTIMIZE_DEPS = [...REACT_OPTIMIZE_DEPS, "react-dom/client"];
|
|
58
|
+
const WORKER_OPTIMIZE_DEPS = [
|
|
59
|
+
...REACT_OPTIMIZE_DEPS,
|
|
60
|
+
"react-dom/server",
|
|
61
|
+
"void/live/client"
|
|
58
62
|
];
|
|
59
|
-
const WORKER_OPTIMIZE_DEPS = [...REACT_OPTIMIZE_DEPS, "void/live/client"];
|
|
60
63
|
const REACT_REFRESH_PREAMBLE = `
|
|
61
64
|
<script type="module">
|
|
62
65
|
import RefreshRuntime from "/@react-refresh"
|
|
@@ -134,7 +137,15 @@ function pagesPlugin(pagesDir, options) {
|
|
|
134
137
|
const normalizedPath = normalizePath(path);
|
|
135
138
|
if (normalizedPath !== normalizedPagesDir && !normalizedPath.startsWith(normalizedPagesDir + "/")) return;
|
|
136
139
|
if (event === "change" && !normalizedPath.endsWith(".md")) return;
|
|
137
|
-
|
|
140
|
+
try {
|
|
141
|
+
await runRescan();
|
|
142
|
+
} catch (error) {
|
|
143
|
+
server.config.logger.error(error instanceof Error ? error.message : String(error), {
|
|
144
|
+
error: error instanceof Error ? error : void 0,
|
|
145
|
+
timestamp: true
|
|
146
|
+
});
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
138
149
|
invalidatePageModules(server);
|
|
139
150
|
};
|
|
140
151
|
server.watcher.on("add", (path) => handlePagesChange(path, "add"));
|
|
@@ -152,9 +163,9 @@ function pagesPlugin(pagesDir, options) {
|
|
|
152
163
|
resolve: { dedupe: REACT_DEDUPE },
|
|
153
164
|
optimizeDeps: {
|
|
154
165
|
exclude: ["@void/react"],
|
|
155
|
-
include:
|
|
166
|
+
include: CLIENT_OPTIMIZE_DEPS
|
|
156
167
|
},
|
|
157
|
-
ssr: { optimizeDeps: { include:
|
|
168
|
+
ssr: { optimizeDeps: { include: [...CLIENT_OPTIMIZE_DEPS, "react-dom/server"] } },
|
|
158
169
|
environments: { [WORKER_ENVIRONMENT_NAME]: { optimizeDeps: {
|
|
159
170
|
exclude: ["@void/react"],
|
|
160
171
|
entries: [pagesOptimizeEntries],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@void/react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "React pages, server rendering, forms, and navigation for Void.",
|
|
5
5
|
"homepage": "https://void.cloud",
|
|
6
6
|
"bugs": {
|
|
@@ -45,17 +45,17 @@
|
|
|
45
45
|
"@types/react": "^19.3.0",
|
|
46
46
|
"@types/react-dom": "^19.3.0",
|
|
47
47
|
"pathslash": "^0.1.0",
|
|
48
|
-
"react": "^19.3.
|
|
49
|
-
"react-dom": "^19.3.
|
|
50
|
-
"vite": "npm:@voidzero-dev/vite-plus-core@1.
|
|
51
|
-
"vite-plus": "1.
|
|
52
|
-
"void": "1.
|
|
48
|
+
"react": "^19.3.1",
|
|
49
|
+
"react-dom": "^19.3.1",
|
|
50
|
+
"vite": "npm:@voidzero-dev/vite-plus-core@1.3.0",
|
|
51
|
+
"vite-plus": "1.3.0",
|
|
52
|
+
"void": "1.2.0"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
55
|
"react": "^19.0.0",
|
|
56
56
|
"react-dom": "^19.0.0",
|
|
57
57
|
"vite": "^8.0.0",
|
|
58
|
-
"void": "1.
|
|
58
|
+
"void": "1.2.0"
|
|
59
59
|
},
|
|
60
60
|
"scripts": {
|
|
61
61
|
"build": "vp pack",
|