@codemoreira/esad 2.0.1-22 → 2.0.1-23
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 +1 -1
- package/src/plugin/index.js +3 -10
package/package.json
CHANGED
package/src/plugin/index.js
CHANGED
|
@@ -2,7 +2,7 @@ const path = require('node:path');
|
|
|
2
2
|
const fs = require('node:fs');
|
|
3
3
|
const Repack = require('@callstack/repack');
|
|
4
4
|
const { ExpoModulesPlugin } = require('@callstack/repack-plugin-expo-modules');
|
|
5
|
-
const { DefinePlugin,
|
|
5
|
+
const { DefinePlugin, ProvidePlugin } = require('@rspack/core');
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* ESAD Re.Pack Plugin Wrapper
|
|
@@ -134,15 +134,8 @@ function withESAD(env, options) {
|
|
|
134
134
|
}),
|
|
135
135
|
'__DEV__': JSON.stringify(isDev),
|
|
136
136
|
}),
|
|
137
|
-
new
|
|
138
|
-
|
|
139
|
-
entryOnly: true,
|
|
140
|
-
banner: `
|
|
141
|
-
global.process = global.process || { env: {} };
|
|
142
|
-
global.process.env.EXPO_OS = '${platform}';
|
|
143
|
-
global.process.env.NODE_ENV = '${isDev ? 'development' : 'production'}';
|
|
144
|
-
global.process.env.REPACK_PLATFORM = '${platform}';
|
|
145
|
-
`,
|
|
137
|
+
new ProvidePlugin({
|
|
138
|
+
process: 'process/browser',
|
|
146
139
|
}),
|
|
147
140
|
new ExpoModulesPlugin(),
|
|
148
141
|
new Repack.RepackPlugin(),
|