@promakeai/cli 0.3.8 → 0.4.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.
@@ -1,17 +1,9 @@
1
1
  import path from "path";
2
- import fs from "fs";
3
2
  import tailwindcss from "@tailwindcss/vite";
4
3
  import react from "@vitejs/plugin-react";
5
4
  import { defineConfig, type Plugin } from "vite";
6
5
  import { inspectorDebugger } from "@promakeai/inspector/plugin";
7
6
 
8
- // Read all dependencies from package.json for optimization
9
- function getOptimizeDeps(): string[] {
10
- const packageJsonPath = path.resolve(__dirname, "package.json");
11
- const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf-8"));
12
- return Object.keys(packageJson.dependencies || {});
13
- }
14
-
15
7
  // Plugin: Restart dev server when new lang files are added
16
8
  function langWatchPlugin(): Plugin {
17
9
  return {
@@ -48,7 +40,71 @@ export default defineConfig(({ mode }) => ({
48
40
  preserveSymlinks: true,
49
41
  },
50
42
  optimizeDeps: {
51
- include: getOptimizeDeps(),
43
+ include: [
44
+ // Radix UI - CJS/ESM compatibility issues
45
+ "@radix-ui/react-dropdown-menu",
46
+ "@radix-ui/react-dialog",
47
+ "@radix-ui/react-select",
48
+ "@radix-ui/react-popover",
49
+ "@radix-ui/react-tooltip",
50
+ "@radix-ui/react-tabs",
51
+ "@radix-ui/react-checkbox",
52
+ "@radix-ui/react-accordion",
53
+ "@radix-ui/react-alert-dialog",
54
+ "@radix-ui/react-avatar",
55
+ "@radix-ui/react-collapsible",
56
+ "@radix-ui/react-context-menu",
57
+ "@radix-ui/react-hover-card",
58
+ "@radix-ui/react-label",
59
+ "@radix-ui/react-menubar",
60
+ "@radix-ui/react-navigation-menu",
61
+ "@radix-ui/react-progress",
62
+ "@radix-ui/react-radio-group",
63
+ "@radix-ui/react-scroll-area",
64
+ "@radix-ui/react-separator",
65
+ "@radix-ui/react-slider",
66
+ "@radix-ui/react-switch",
67
+ "@radix-ui/react-toggle",
68
+ "@radix-ui/react-toggle-group",
69
+
70
+ // State management - ESM issues
71
+ "@tanstack/react-query",
72
+ "zustand",
73
+
74
+ // Form libraries - external deps
75
+ "react-hook-form",
76
+ "@hookform/resolvers",
77
+ "zod",
78
+
79
+ // UI libraries - CJS/ESM mixed
80
+ "cmdk",
81
+ "vaul",
82
+ "sonner",
83
+
84
+ // Date libraries - CJS format
85
+ "date-fns",
86
+ "react-day-picker",
87
+
88
+ // Charts - many sub-dependencies
89
+ "recharts",
90
+
91
+ // Carousel - external deps
92
+ "embla-carousel-react",
93
+
94
+ // HTTP client - CJS format
95
+ "axios",
96
+
97
+ // i18n - external deps
98
+ "i18next",
99
+ "react-i18next",
100
+ "i18next-browser-languagedetector",
101
+
102
+ // Animation - ESM issues
103
+ "motion",
104
+
105
+ // Database - WASM loader
106
+ "sql.js",
107
+ ],
52
108
  },
53
109
  server: {
54
110
  host: '0.0.0.0',