baraqex 1.0.69 → 1.0.71

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.
@@ -9,7 +9,7 @@
9
9
  "version": "0.1.0",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
- "baraqex": "^1.0.68",
12
+ "baraqex": "^1.0.70",
13
13
  "dotenv": "^16.0.0",
14
14
  "express": "^4.21.2"
15
15
  },
@@ -699,9 +699,9 @@
699
699
  }
700
700
  },
701
701
  "node_modules/baraqex": {
702
- "version": "1.0.68",
703
- "resolved": "https://registry.npmjs.org/baraqex/-/baraqex-1.0.68.tgz",
704
- "integrity": "sha512-S9YqZw4a/h0atirvgyZQpXr8fR+XyOje3UAOQtewl2c2G19K01BJG0kCKKshQziV0o7dw7RO1P3iHkpZ3OL1eA==",
702
+ "version": "1.0.70",
703
+ "resolved": "https://registry.npmjs.org/baraqex/-/baraqex-1.0.70.tgz",
704
+ "integrity": "sha512-BTH8vXi8RWmeSjh2w1+VCThO5WWmJC4pDcwVOdIBecTGg0Ult+L7tuYTtDSXWe/i8w6t9pe9BOXJf+3pbfh2yg==",
705
705
  "license": "MIT",
706
706
  "dependencies": {
707
707
  "chokidar": "^4.0.3",
@@ -12,7 +12,7 @@
12
12
  "test": "echo \"Error: no test specified\" && exit 1"
13
13
  },
14
14
  "dependencies": {
15
- "baraqex": "^1.0.68",
15
+ "baraqex": "^1.0.70",
16
16
  "dotenv": "^16.0.0",
17
17
  "express": "^4.21.2"
18
18
  },
@@ -0,0 +1,56 @@
1
+ import { defineConfig } from 'vite';
2
+
3
+ export default defineConfig({
4
+ esbuild: {
5
+ jsxFactory: 'jsx',
6
+ jsxFragment: 'Fragment',
7
+ jsxInject: `import { jsx } from 'baraqex';`
8
+ },
9
+ define: {
10
+ // Ensure we're in browser mode
11
+ 'process.env.NODE_ENV': JSON.stringify('development'),
12
+ 'typeof window': '"object"',
13
+ 'global': 'globalThis'
14
+ },
15
+ optimizeDeps: {
16
+ // Exclude ALL server-only dependencies from browser bundle
17
+ exclude: [
18
+ // Only exclude actual server modules that would cause issues
19
+ 'express',
20
+ 'mysql2',
21
+ 'mongodb',
22
+ 'pg',
23
+ 'bcryptjs',
24
+ 'jsonwebtoken',
25
+ 'cors'
26
+ ],
27
+ // Force include browser-safe modules
28
+ include: [
29
+ 'frontend-hamroun',
30
+ 'baraqex'
31
+ ]
32
+ },
33
+ resolve: {
34
+ alias: {
35
+ // Only alias problematic Node.js built-ins, not everything
36
+ 'fs': false,
37
+ 'path': false,
38
+ 'http': false,
39
+ 'https': false,
40
+ 'url': false,
41
+ 'os': false,
42
+ 'crypto': false
43
+ },
44
+ // Only use browser-compatible fields
45
+ mainFields: ['browser', 'module', 'main']
46
+ },
47
+ server: {
48
+ hmr: {
49
+ overlay: true
50
+ },
51
+ fs: {
52
+ // Allow serving files from the project root
53
+ allow: ['..']
54
+ }
55
+ }
56
+ });