1
- diff --git a/node_modules/@mendix/pluggable-widgets-tools/configs/rollup-plugin-collect-dependencies.mjs b/node_modules/@mendix/pluggable-widgets-toolsconfigs /rollup-plugin-collect-dependencies.mjs
2
- index 2d0b5bfac7f1a1482bc1a222cba3e52b0339cc79..44ab7f4aa30abc0ba52672ea3e717f4401d00ed5 100644
1
+ diff --git a/node_modules/@mendix/pluggable-widgets-tools/configs/rollup-plugin-collect-dependencies.mjs b/node_modules/@mendix/pluggable-widgets-tools/configs /rollup-plugin-collect-dependencies.mjs
2
+ index 2d0b5bfac7f1a1482bc1a222cba3e52b0339cc79..a3f0e368d76d294a5f7cd85886fe5ce0e72b9619 100644
3
3
--- a/node_modules/@mendix/pluggable-widgets-tools/configs/rollup-plugin-collect-dependencies.mjs
4
4
+++ b/node_modules/@mendix/pluggable-widgets-tools/configs/rollup-plugin-collect-dependencies.mjs
5
5
@@ -2,9 +2,8 @@
6
6
7
7
import fg from "fast-glob";
8
8
import fsExtra from "fs-extra";
9
9
- import { existsSync, readFileSync, writeFileSync } from "fs";
10
- + import { existsSync, readFileSync, writeFileSync, cpSync } from "fs";
10
+ + import { existsSync, readFileSync, writeFileSync, cpSync, lstatSync, realpathSync } from "fs";
11
11
import { dirname, join, parse } from "path";
12
12
- import copy from "recursive-copy";
13
13
import { promisify } from "util";
14
14
import resolve from "resolve";
15
15
import _ from "lodash";
16
- @@ -171,15 +174,34 @@ async function copyJsModule(moduleSourcePath, to) {
16
+ @@ -171,15 +170,41 @@ async function copyJsModule(moduleSourcePath, to) {
17
17
if (existsSync(to)) {
18
18
return;
19
19
}
@@ -28,10 +28,17 @@ index 2d0b5bfac7f1a1482bc1a222cba3e52b0339cc79..44ab7f4aa30abc0ba52672ea3e717f44
28
28
- });
29
29
+
30
30
+ try {
31
- + cpSync(moduleSourcePath, to, {
31
+ + // Check if the source is a symlink and resolve it to the actual path
32
+ + let actualSourcePath = moduleSourcePath;
33
+ + if (lstatSync(moduleSourcePath).isSymbolicLink()) {
34
+ + actualSourcePath = realpathSync(moduleSourcePath);
35
+ + }
36
+ +
37
+ + cpSync(actualSourcePath, to, {
32
38
+ recursive: true,
39
+ + dereference: true, // Follow symlinks and copy the actual files
33
40
+ filter: (src, dest) => {
34
- + const relativePath = src.replace(moduleSourcePath , '').replace(/^[\\/]/, '');
41
+ + const relativePath = src.replace(actualSourcePath , '').replace(/^[\\/]/, '');
35
42
+
36
43
+ // Skip certain directories
37
44
+ if (relativePath.match(/[\\/](android|ios|windows|mac|jest|github|gradle|__.*__|docs|example.*)[\\/]/)) {
0 commit comments