Skip to content

Commit 3bf2084

Browse files
committed
feat: update patch
1 parent 6587fba commit 3bf2084

File tree

2 files changed

+89
-47
lines changed

2 files changed

+89
-47
lines changed

patches/@mendix+pluggable-widgets-tools+10.21.1.patch

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,48 @@ index 682cf9fc4259a1f431e7cc3b17a319fdb072929e..5be03c770f8247637223f78738c3cdec
104104
/^react-native-svg($|\/)/,
105105
/^react-native-vector-icons($|\/)/,
106106
/^@?react-navigation($|\/)/,
107+
@@ -179,6 +179,18 @@ export default async args => {
108+
return result;
109+
110+
function getCommonPlugins(config) {
111+
+ const hasReanimated = (() => {
112+
+ try {
113+
+ const packageJson = require(join(sourcePath, "package.json"));
114+
+ return !!(
115+
+ (packageJson.dependencies && packageJson.dependencies["react-native-reanimated"]) ||
116+
+ (packageJson.peerDependencies && packageJson.peerDependencies["react-native-reanimated"])
117+
+ );
118+
+ } catch {
119+
+ return false;
120+
+ }
121+
+ })();
122+
+
123+
return [
124+
nodeResolve({ preferBuiltins: false, mainFields: ["module", "browser", "main"] }),
125+
isTypescript
126+
@@ -232,7 +244,21 @@ export default async args => {
127+
})
128+
: null,
129+
image(),
130+
- production ? terser({ mangle: false }) : null,
131+
+ production ? terser(hasReanimated
132+
+ ? {
133+
+ mangle: false,
134+
+ compress: {
135+
+ defaults: false,
136+
+ inline: false,
137+
+ reduce_funcs: false,
138+
+ side_effects: false,
139+
+ },
140+
+ keep_fnames: true,
141+
+ keep_classnames: true,
142+
+ module: false,
143+
+ format: { comments: false }
144+
+ }
145+
+ : { mangle: false }) : null,
146+
// We need to create .mpk and copy results to test project after bundling is finished.
147+
// In case of a regular build is it is on `writeBundle` of the last config we define
148+
// (since rollup processes configs sequentially). But in watch mode rollup re-bundles only
107149
diff --git a/configs/tsconfig.base.json b/configs/tsconfig.base.json
108150
index 5cee5d4d880e152576fc7cad69dd8c22dfbedee8..62627fd52bf0d5847d9ebec37fadac3142ed71a7 100644
109151
--- a/configs/tsconfig.base.json
@@ -176,4 +218,4 @@ index eed8109dada3788bb1195573b9713eb1f00dd8f9..4b422fac0e21d2b1f44a763d0b21b028
176218
module.exports = require("babel-jest").createTransformer({
177219
- presets: ["module:metro-react-native-babel-preset"]
178220
+ presets: ["module:@react-native/babel-preset"]
179-
});
221+
});

0 commit comments

Comments
 (0)