@flexireact/core 2.0.0 → 2.0.1
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/core/config.ts +7 -4
- package/core/index.ts +4 -1
- package/package.json +2 -2
package/core/config.ts
CHANGED
|
@@ -63,8 +63,11 @@ export const defaultConfig = {
|
|
|
63
63
|
* @param {string} projectRoot - Path to project root
|
|
64
64
|
* @returns {Object} Merged configuration
|
|
65
65
|
*/
|
|
66
|
-
export async function loadConfig(projectRoot) {
|
|
67
|
-
|
|
66
|
+
export async function loadConfig(projectRoot: string) {
|
|
67
|
+
// Try .ts first, then .js
|
|
68
|
+
const configPathTs = path.join(projectRoot, 'flexireact.config.ts');
|
|
69
|
+
const configPathJs = path.join(projectRoot, 'flexireact.config.js');
|
|
70
|
+
const configPath = fs.existsSync(configPathTs) ? configPathTs : configPathJs;
|
|
68
71
|
|
|
69
72
|
let userConfig = {};
|
|
70
73
|
|
|
@@ -73,8 +76,8 @@ export async function loadConfig(projectRoot) {
|
|
|
73
76
|
const configUrl = pathToFileURL(configPath).href;
|
|
74
77
|
const module = await import(`${configUrl}?t=${Date.now()}`);
|
|
75
78
|
userConfig = module.default || module;
|
|
76
|
-
} catch (error) {
|
|
77
|
-
console.warn('Warning: Failed to load flexireact
|
|
79
|
+
} catch (error: any) {
|
|
80
|
+
console.warn('Warning: Failed to load flexireact config:', error.message);
|
|
78
81
|
}
|
|
79
82
|
}
|
|
80
83
|
|
package/core/index.ts
CHANGED
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
* A modern React framework with RSC, SSG, Islands, and more
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
// Types
|
|
7
|
+
export type { FlexiConfig, Route, RouteType as RouteTypeEnum, PageProps, LayoutProps } from './types.js';
|
|
8
|
+
|
|
6
9
|
// Core exports
|
|
7
10
|
export { loadConfig, defaultConfig, resolvePaths } from './config.js';
|
|
8
11
|
export { createRequestContext, useRequest, useParams, useQuery, usePathname } from './context.js';
|
|
@@ -68,7 +71,7 @@ export {
|
|
|
68
71
|
} from './plugins/index.js';
|
|
69
72
|
|
|
70
73
|
// Version
|
|
71
|
-
export const VERSION = '2.0.
|
|
74
|
+
export const VERSION = '2.0.1';
|
|
72
75
|
|
|
73
76
|
// Default export
|
|
74
77
|
export default {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flexireact/core",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "The Modern React Framework v2 - SSR, SSG, Islands, App Router, TypeScript, Tailwind",
|
|
5
5
|
"main": "core/index.ts",
|
|
6
6
|
"types": "core/types.ts",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
},
|
|
55
55
|
"homepage": "https://github.com/flexireact/flexireact#readme",
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"esbuild": "^0.
|
|
57
|
+
"esbuild": "^0.25.0",
|
|
58
58
|
"ora": "^8.1.1",
|
|
59
59
|
"picocolors": "^1.1.1",
|
|
60
60
|
"prompts": "^2.4.2"
|