wirejs-scripts 3.0.19 → 3.0.21
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/bin.js +13 -9
- package/package.json +2 -2
package/bin.js
CHANGED
|
@@ -232,15 +232,19 @@ function routeSSR(context, forceExt) {
|
|
|
232
232
|
? toJSPath(context.location.pathname)
|
|
233
233
|
: context.location.pathname;
|
|
234
234
|
|
|
235
|
-
|
|
236
|
-
.
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
235
|
+
try {
|
|
236
|
+
const allHandlers = fs.readdirSync(SSR_ROOT, { recursive: true })
|
|
237
|
+
.filter(p => p.endsWith('.js'))
|
|
238
|
+
.map(p => `/${p}`)
|
|
239
|
+
;
|
|
240
|
+
const matchingHandlers = allHandlers.filter(h => globMatch(h, asJSPath));
|
|
241
|
+
const match = matchingHandlers.sort(byLength).pop();
|
|
242
|
+
|
|
243
|
+
if (match) {
|
|
244
|
+
return path.join(SSR_ROOT, match);
|
|
245
|
+
}
|
|
246
|
+
} catch (error) {
|
|
247
|
+
return;
|
|
244
248
|
}
|
|
245
249
|
}
|
|
246
250
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wirejs-scripts",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.21",
|
|
4
4
|
"description": "Basic build and start commands for wirejs apps",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -34,6 +34,6 @@
|
|
|
34
34
|
"style-loader": "^2.0.0",
|
|
35
35
|
"webpack": "^5.97.1",
|
|
36
36
|
"wirejs-dom": "^1.0.38",
|
|
37
|
-
"wirejs-resources": "^0.1.
|
|
37
|
+
"wirejs-resources": "^0.1.23"
|
|
38
38
|
}
|
|
39
39
|
}
|