aaex-cli 3.0.0 → 3.1.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.
@@ -46,13 +46,10 @@ async function createPackageJson() {
46
46
  type: "module",
47
47
  scripts: {
48
48
  dev: "node .aaex/server/server.js",
49
- build:
50
- "npm run build:client && npm run build:server && npm run build:api",
51
- "build:client": "vite build --outDir dist/client",
52
- "build:server":
53
- "vite build --ssr .aaex/framework/entry-server.tsx --outDir dist/server",
54
- "build:api": "tsc --project tsconfig.api.json",
55
- "build:utils": "tsc --project tsconfig.utils.json",
49
+ build:"vite build && node .aaex/Build.js",
50
+ "build:client": "vite build",
51
+ "build:server": "vite build --config vite.server.config.ts",
52
+ "client-entry": "node .aaex/Build.js",
56
53
  preview: "cross-env NODE_ENV=production node .aaex/server/server.js",
57
54
  },
58
55
  dependencies: {
@@ -63,14 +60,14 @@ async function createPackageJson() {
63
60
  express: "^5.1.0",
64
61
  compression: "^1.8.1",
65
62
  sirv: "^3.0.2",
66
- "aaex-file-router": "^2.1.0",
63
+ "aaex-file-router": "^2.4.2",
67
64
  jsonwebtoken: "^9.0.3",
68
65
  mongodb: "^7.0.0",
69
66
  pg: "^8.16.3",
70
67
 
71
68
  bcrypt: "^6.0.0",
72
69
  dotenv: "^17.2.3",
73
- aaexjs: "^2.1.5",
70
+ aaexjs: "^3.1.0",
74
71
  },
75
72
  devDependencies: {
76
73
  typescript: "~5.9.2",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aaex-cli",
3
- "version": "3.0.0",
3
+ "version": "3.1.0",
4
4
  "description": "Command line interface for creating aaexjs app",
5
5
  "license": "ISC",
6
6
  "author": "",
@@ -24,6 +24,7 @@
24
24
  "aaex-file-router": "^2.0.4",
25
25
  "bcrypt": "^6.0.0",
26
26
  "express": "^5.2.1",
27
+ "fast-glob": "^3.3.3",
27
28
  "jsonwebtoken": "^9.0.3",
28
29
  "mongodb": "^7.0.0",
29
30
  "pg": "^8.16.3",
@@ -3,7 +3,6 @@ import react from "@vitejs/plugin-react";
3
3
  import { aaexServerRouter } from "aaex-file-router/plugin";
4
4
  import { SSRCss } from "aaexjs";
5
5
 
6
- // https://vite.dev/config/
7
6
  export default defineConfig({
8
7
  plugins: [react(), aaexServerRouter(), SSRCss()],
9
8
  root: ".",
@@ -12,7 +11,17 @@ export default defineConfig({
12
11
  emptyOutDir: true,
13
12
  manifest: true,
14
13
  rollupOptions: {
15
- input: "/index.html",
14
+ treeshake: false, //makes sure the load function gets build correctly
15
+ preserveEntrySignatures: true,
16
+ input: ".aaex/framework/entry-client.tsx",
17
+ output: {
18
+ format: "es",
19
+ preserveModules: true,
20
+ preserveModulesRoot: "src",
21
+ entryFileNames: "[name].js",
22
+ chunkFileNames: "[name].js",
23
+ assetFileNames: "[name][extname]",
24
+ },
16
25
  },
17
26
  },
18
27
  });
@@ -0,0 +1,20 @@
1
+ import fg from "fast-glob";
2
+ import { defineConfig } from "vite";
3
+ import path from "path";
4
+
5
+ const apiEntries = await fg("src/api/**/*.ts");
6
+
7
+ export default defineConfig({
8
+ build: {
9
+ ssr: true,
10
+ outDir: "dist/server",
11
+ rollupOptions: {
12
+ input: [".aaex/framework/entry-server.tsx", ...apiEntries],
13
+ output: {
14
+ format: "es",
15
+ preserveModules: true,
16
+ preserveModulesRoot: "src",
17
+ },
18
+ },
19
+ },
20
+ });