arcanajs 2.0.1 → 2.0.3
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.
|
@@ -99,9 +99,12 @@ class ArcanaJSServer {
|
|
|
99
99
|
if (stat.isDirectory()) {
|
|
100
100
|
traverse(fullPath);
|
|
101
101
|
}
|
|
102
|
-
else if (file.endsWith(".tsx") ||
|
|
102
|
+
else if (file.endsWith(".tsx") ||
|
|
103
|
+
file.endsWith(".jsx") ||
|
|
104
|
+
file.endsWith(".js") ||
|
|
105
|
+
file.endsWith(".ts")) {
|
|
103
106
|
const relativePath = path_1.default.relative(viewsDir, fullPath);
|
|
104
|
-
const viewName = relativePath.replace(/\.(tsx|jsx)$/, "");
|
|
107
|
+
const viewName = relativePath.replace(/\.(tsx|jsx|js|ts)$/, "");
|
|
105
108
|
try {
|
|
106
109
|
// Use __non_webpack_require__ if available to avoid Webpack bundling issues
|
|
107
110
|
// or standard require if running in Node directly
|
|
@@ -115,7 +118,8 @@ class ArcanaJSServer {
|
|
|
115
118
|
requireFunc("ts-node/register");
|
|
116
119
|
}
|
|
117
120
|
catch (e) {
|
|
118
|
-
|
|
121
|
+
console.warn("ts-node/register failed. Ensure ts-node is installed if you are using .tsx/.ts views in runtime.");
|
|
122
|
+
return;
|
|
119
123
|
}
|
|
120
124
|
}
|
|
121
125
|
const pageModule = requireFunc(fullPath);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "arcanajs",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"description": "ArcanaJS Framework",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
"style-loader": "^4.0.0",
|
|
54
54
|
"tailwindcss": "^4.1.17",
|
|
55
55
|
"ts-loader": "^9.4.4",
|
|
56
|
+
"ts-node": "^10.9.2",
|
|
56
57
|
"typescript": "^5.2.2",
|
|
57
58
|
"webpack": "^5.88.2",
|
|
58
59
|
"webpack-cli": "^6.0.1",
|
|
@@ -65,7 +66,6 @@
|
|
|
65
66
|
"@types/node": "^24.10.1",
|
|
66
67
|
"@types/react": "^19.2.7",
|
|
67
68
|
"@types/react-dom": "^19.2.3",
|
|
68
|
-
"ts-node": "^10.9.2",
|
|
69
69
|
"tsx": "^4.20.6"
|
|
70
70
|
}
|
|
71
71
|
}
|