@idealyst/cli 1.0.12 → 1.0.13
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/package.json
CHANGED
|
@@ -1,34 +1,69 @@
|
|
|
1
|
-
import { defineConfig } from 'vite'
|
|
2
|
-
import react from '@vitejs/plugin-react'
|
|
3
|
-
import
|
|
1
|
+
import { defineConfig } from 'vite'
|
|
2
|
+
import react from '@vitejs/plugin-react'
|
|
3
|
+
import babel from 'vite-plugin-babel'
|
|
4
|
+
import path from 'path'
|
|
4
5
|
|
|
5
6
|
// https://vitejs.dev/config/
|
|
6
7
|
export default defineConfig({
|
|
7
|
-
plugins: [
|
|
8
|
-
babel
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
[
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
8
|
+
plugins: [
|
|
9
|
+
babel({
|
|
10
|
+
filter: (id) => {
|
|
11
|
+
return id.includes('node_modules/@idealyst/') && /\.(js|jsx|ts|tsx)$/.test(id);
|
|
12
|
+
},
|
|
13
|
+
babelConfig: {
|
|
14
|
+
presets: [
|
|
15
|
+
['@babel/preset-typescript', {
|
|
16
|
+
isTSX: true,
|
|
17
|
+
allExtensions: true,
|
|
18
|
+
}]
|
|
19
|
+
],
|
|
20
|
+
plugins: [
|
|
21
|
+
['react-native-unistyles/plugin', {
|
|
22
|
+
root: 'src',
|
|
23
|
+
debug: true,
|
|
24
|
+
autoProcessPaths: ['@idealyst/components', '@idealyst/navigation', '@idealyst/theme'],
|
|
25
|
+
}],
|
|
26
|
+
['@idealyst/components/plugin/web', { root: 'src' }]
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
}),
|
|
30
|
+
// Then process everything else with React plugin
|
|
31
|
+
react(),
|
|
32
|
+
],
|
|
19
33
|
resolve: {
|
|
20
34
|
alias: {
|
|
21
35
|
// Use absolute path to resolve react-native-web properly
|
|
22
36
|
'react-native': path.resolve(__dirname, 'node_modules/react-native-web'),
|
|
23
37
|
'@react-native/normalize-colors': path.resolve(__dirname, 'node_modules/@react-native/normalize-colors'),
|
|
24
38
|
},
|
|
25
|
-
|
|
39
|
+
// Platform-specific file resolution
|
|
40
|
+
extensions: ['.web.tsx', '.web.ts', '.tsx', '.ts', '.js', '.jsx'],
|
|
41
|
+
// Ensure proper resolution of package exports
|
|
42
|
+
conditions: ['browser', 'import', 'module', 'default']
|
|
26
43
|
},
|
|
27
44
|
define: {
|
|
28
|
-
global: 'globalThis'
|
|
45
|
+
global: 'globalThis',
|
|
46
|
+
__DEV__: JSON.stringify(true),
|
|
47
|
+
},
|
|
48
|
+
optimizeDeps: {
|
|
49
|
+
include: [
|
|
50
|
+
'react-native-web',
|
|
51
|
+
'@react-native/normalize-colors',
|
|
52
|
+
'react-native-unistyles',
|
|
53
|
+
'react-native-unistyles/web',
|
|
54
|
+
'@mdi/react',
|
|
55
|
+
'@mdi/js',
|
|
56
|
+
],
|
|
57
|
+
exclude: [
|
|
58
|
+
'react-native-edge-to-edge',
|
|
59
|
+
'react-native-nitro-modules',
|
|
60
|
+
'@idealyst/components',
|
|
61
|
+
'@idealyst/navigation',
|
|
62
|
+
'@idealyst/theme',
|
|
63
|
+
],
|
|
29
64
|
},
|
|
30
65
|
server: {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
})
|
|
66
|
+
host: '0.0.0.0',
|
|
67
|
+
port: 5173
|
|
68
|
+
},
|
|
69
|
+
})
|