@codemoreira/esad 2.0.1-18 → 2.0.1-19
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 +2 -1
- package/src/plugin/index.js +12 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codemoreira/esad",
|
|
3
|
-
"version": "2.0.1-
|
|
3
|
+
"version": "2.0.1-19",
|
|
4
4
|
"description": "Easy Super App Development - Zero-Config CLI and DevTools for React Native Module Federation",
|
|
5
5
|
"main": "src/plugin/index.js",
|
|
6
6
|
"types": "./src/plugin/index.d.ts",
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
"@swc/helpers": "^0.5.11",
|
|
45
45
|
"adm-zip": "^0.5.10",
|
|
46
46
|
"babel-loader": "^9.1.3",
|
|
47
|
+
"babel-plugin-transform-inline-environment-variables": "^6.24.1",
|
|
47
48
|
"babel-preset-expo": "~12.0.0",
|
|
48
49
|
"chalk": "^4.1.2",
|
|
49
50
|
"commander": "^11.1.0",
|
package/src/plugin/index.js
CHANGED
|
@@ -76,6 +76,12 @@ function withESAD(env, options) {
|
|
|
76
76
|
presets: [
|
|
77
77
|
['babel-preset-expo', { platform }],
|
|
78
78
|
],
|
|
79
|
+
plugins: [
|
|
80
|
+
[
|
|
81
|
+
require.resolve('babel-plugin-transform-inline-environment-variables'),
|
|
82
|
+
{ include: ['EXPO_OS', 'NODE_ENV'] }
|
|
83
|
+
]
|
|
84
|
+
],
|
|
79
85
|
sourceType: 'unambiguous',
|
|
80
86
|
caller: { name: 'repack', platform },
|
|
81
87
|
},
|
|
@@ -94,6 +100,12 @@ function withESAD(env, options) {
|
|
|
94
100
|
presets: [
|
|
95
101
|
['babel-preset-expo', { platform }],
|
|
96
102
|
],
|
|
103
|
+
plugins: [
|
|
104
|
+
[
|
|
105
|
+
require.resolve('babel-plugin-transform-inline-environment-variables'),
|
|
106
|
+
{ include: ['EXPO_OS', 'NODE_ENV'] }
|
|
107
|
+
]
|
|
108
|
+
],
|
|
97
109
|
caller: { name: 'repack', platform },
|
|
98
110
|
},
|
|
99
111
|
},
|
|
@@ -109,11 +121,6 @@ function withESAD(env, options) {
|
|
|
109
121
|
'process.env.NODE_ENV': JSON.stringify(isDev ? 'development' : 'production'),
|
|
110
122
|
'process.env.EXPO_OS': JSON.stringify(platform),
|
|
111
123
|
'process.env.REPACK_PLATFORM': JSON.stringify(platform),
|
|
112
|
-
'process.env': JSON.stringify({
|
|
113
|
-
NODE_ENV: isDev ? 'development' : 'production',
|
|
114
|
-
EXPO_OS: platform,
|
|
115
|
-
REPACK_PLATFORM: platform,
|
|
116
|
-
}),
|
|
117
124
|
'__DEV__': JSON.stringify(isDev),
|
|
118
125
|
}),
|
|
119
126
|
new ExpoModulesPlugin(),
|