Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 31 additions & 2 deletions patches/@mendix+pluggable-widgets-tools+10.21.1.patch
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,47 @@ index 2d0b5bfac7f1a1482bc1a222cba3e52b0339cc79..a3f0e368d76d294a5f7cd85886fe5ce0

function getModuleName(modulePath) {
diff --git a/configs/rollup.config.native.mjs b/configs/rollup.config.native.mjs
index 682cf9fc4259a1f431e7cc3b17a319fdb072929e..5be03c770f8247637223f78738c3cdecae4d3d92 100644
index 682cf9fc4259a1f431e7cc3b17a319fdb072929e..b02cc48a73e4e8d7879993669daa036159ed6b6c 100644
--- a/configs/rollup.config.native.mjs
+++ b/configs/rollup.config.native.mjs
@@ -62,7 +62,7 @@ const nativeExternal = [
@@ -62,7 +62,8 @@ const nativeExternal = [
/^react($|\/)/,
/^react-native-gesture-handler($|\/)/,
/^react-native-reanimated($|\/)/,
- /^react-native-fast-image($|\/)/,
+ /^@d11\/react-native-fast-image($|\/)/,
+ /^@gorhom\/bottom-sheet($|\/)/,
/^react-native-svg($|\/)/,
/^react-native-vector-icons($|\/)/,
/^@?react-navigation($|\/)/,
@@ -177,6 +178,18 @@ export default async args => {
return result;

function getCommonPlugins(config) {
+ const hasReanimated = (() => {
+ try {
+ const packageJson = require(join(sourcePath, "package.json"));
+ return !!(
+ (packageJson.dependencies && packageJson.dependencies["react-native-reanimated"]) ||
+ (packageJson.peerDependencies && packageJson.peerDependencies["react-native-reanimated"])
+ );
+ } catch {
+ return false;
+ }
+ })();
+
return [
nodeResolve({ preferBuiltins: false, mainFields: ["module", "browser", "main"] }),
isTypescript
@@ -230,7 +243,7 @@ export default async args => {
})
: null,
image(),
- production ? terser({ mangle: false }) : null,
+ production && !hasReanimated ? terser({ mangle: false }) : null,
// We need to create .mpk and copy results to test project after bundling is finished.
// In case of a regular build is it is on `writeBundle` of the last config we define
// (since rollup processes configs sequentially). But in watch mode rollup re-bundles only
diff --git a/test-config/jest.native.config.js b/test-config/jest.native.config.js
index 72e3c51473b7566ca9d8b224b35334099ce615db..7e0949aa5d50d288d848117a804fd691422aefde 100644
--- a/test-config/jest.native.config.js
Expand Down
Loading
Loading