@jay-framework/dev-server 0.24.3 → 0.24.4
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 +15 -2
- package/package.json +15 -15
package/dist/index.js
CHANGED
|
@@ -1616,6 +1616,11 @@ var __defProp2 = Object.defineProperty;
|
|
|
1616
1616
|
var __defNormalProp2 = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1617
1617
|
var __publicField2 = (obj, key, value) => __defNormalProp2(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1618
1618
|
const require$3 = createRequire(import.meta.url);
|
|
1619
|
+
function resolveClientImportPath(route) {
|
|
1620
|
+
if (route.clientCompPath) return route.clientCompPath;
|
|
1621
|
+
if (route.componentExport) return route.compPath.replace(/index\.js$/, "index.client.js");
|
|
1622
|
+
return route.compPath;
|
|
1623
|
+
}
|
|
1619
1624
|
async function loadPageParts(vite, route, pagesBase, projectBase, jayRollupConfig, options) {
|
|
1620
1625
|
const exists = await fs__default.access(route.compPath, fs__default.constants.F_OK).then(() => true).catch(() => false);
|
|
1621
1626
|
const parts = [];
|
|
@@ -1628,7 +1633,7 @@ async function loadPageParts(vite, route, pagesBase, projectBase, jayRollupConfi
|
|
|
1628
1633
|
`${route.compPath} does not export "${exportName}". The file exists but the expected export is missing — remove the file or add the export.`
|
|
1629
1634
|
);
|
|
1630
1635
|
} else {
|
|
1631
|
-
const clientImportPath = route
|
|
1636
|
+
const clientImportPath = resolveClientImportPath(route);
|
|
1632
1637
|
parts.push({
|
|
1633
1638
|
compDefinition: pageComponent,
|
|
1634
1639
|
clientImport: `import {${exportName}} from '${clientImportPath}'`,
|
|
@@ -4251,9 +4256,17 @@ async function scanPluginRoutes(projectRoot, projectRoutes) {
|
|
|
4251
4256
|
const isLocalComponent = route.component.startsWith(".");
|
|
4252
4257
|
const compPath = isLocalComponent ? path__default.resolve(plugin.pluginPath, route.component) : resolvePluginModule(plugin, route.devOnly === true ? "./tools" : ".");
|
|
4253
4258
|
const componentExport = isLocalComponent ? void 0 : route.component;
|
|
4259
|
+
const clientCompPath = isLocalComponent ? void 0 : resolvePluginExport(plugin.pluginPath, "./client");
|
|
4260
|
+
if (!isLocalComponent && !clientCompPath) {
|
|
4261
|
+
getLogger().error(
|
|
4262
|
+
`[Routes] Plugin "${plugin.name}" route ${route.path}: no "./client" export — hydration cannot load a browser-safe bundle. Add "./client" to package.json exports.`
|
|
4263
|
+
);
|
|
4264
|
+
continue;
|
|
4265
|
+
}
|
|
4254
4266
|
pluginRoutes.push(
|
|
4255
4267
|
createRoute(route.path, jayHtmlPath, compPath, componentExport, {
|
|
4256
|
-
devOnly: route.devOnly === true
|
|
4268
|
+
devOnly: route.devOnly === true,
|
|
4269
|
+
clientCompPath
|
|
4257
4270
|
})
|
|
4258
4271
|
);
|
|
4259
4272
|
getLogger().info(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jay-framework/dev-server",
|
|
3
|
-
"version": "0.24.
|
|
3
|
+
"version": "0.24.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -23,24 +23,24 @@
|
|
|
23
23
|
"test:watch": "vitest"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@jay-framework/compiler-jay-stack": "^0.24.
|
|
27
|
-
"@jay-framework/compiler-shared": "^0.24.
|
|
28
|
-
"@jay-framework/component": "^0.24.
|
|
29
|
-
"@jay-framework/fullstack-component": "^0.24.
|
|
30
|
-
"@jay-framework/logger": "^0.24.
|
|
31
|
-
"@jay-framework/runtime": "^0.24.
|
|
32
|
-
"@jay-framework/stack-client-runtime": "^0.24.
|
|
33
|
-
"@jay-framework/stack-route-scanner": "^0.24.
|
|
34
|
-
"@jay-framework/stack-server-build": "^0.24.
|
|
35
|
-
"@jay-framework/stack-server-runtime": "^0.24.
|
|
36
|
-
"@jay-framework/view-state-merge": "^0.24.
|
|
26
|
+
"@jay-framework/compiler-jay-stack": "^0.24.4",
|
|
27
|
+
"@jay-framework/compiler-shared": "^0.24.4",
|
|
28
|
+
"@jay-framework/component": "^0.24.4",
|
|
29
|
+
"@jay-framework/fullstack-component": "^0.24.4",
|
|
30
|
+
"@jay-framework/logger": "^0.24.4",
|
|
31
|
+
"@jay-framework/runtime": "^0.24.4",
|
|
32
|
+
"@jay-framework/stack-client-runtime": "^0.24.4",
|
|
33
|
+
"@jay-framework/stack-route-scanner": "^0.24.4",
|
|
34
|
+
"@jay-framework/stack-server-build": "^0.24.4",
|
|
35
|
+
"@jay-framework/stack-server-runtime": "^0.24.4",
|
|
36
|
+
"@jay-framework/view-state-merge": "^0.24.4",
|
|
37
37
|
"busboy": "^1.6.0",
|
|
38
38
|
"vite": "^5.0.11"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@jay-framework/dev-environment": "^0.24.
|
|
42
|
-
"@jay-framework/jay-cli": "^0.24.
|
|
43
|
-
"@jay-framework/stack-client-runtime": "^0.24.
|
|
41
|
+
"@jay-framework/dev-environment": "^0.24.4",
|
|
42
|
+
"@jay-framework/jay-cli": "^0.24.4",
|
|
43
|
+
"@jay-framework/stack-client-runtime": "^0.24.4",
|
|
44
44
|
"@playwright/test": "^1.58.2",
|
|
45
45
|
"@types/busboy": "^1.5.4",
|
|
46
46
|
"@types/express": "^5.0.2",
|