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
3+ --- a/node_modules/@mendix/pluggable-widgets-tools/configs/rollup-plugin-collect-dependencies.mjs
4+ +++ b/node_modules/@mendix/pluggable-widgets-tools/configs/rollup-plugin-collect-dependencies.mjs
5+ @@ -2,9 +2,8 @@
6+
7+ import fg from "fast-glob";
8+ import fsExtra from "fs-extra";
9+ - import { existsSync, readFileSync, writeFileSync } from "fs";
10+ + import { existsSync, readFileSync, writeFileSync, cpSync } from "fs";
11+ import { dirname, join, parse } from "path";
12+ - import copy from "recursive-copy";
13+ import { promisify } from "util";
14+ import resolve from "resolve";
15+ import _ from "lodash";
16+ @@ -171,15 +174,34 @@ async function copyJsModule(moduleSourcePath, to) {
17+ if (existsSync(to)) {
18+ return;
19+ }
20+ - return promisify(copy)(moduleSourcePath, to, {
21+ - filter: [
22+ - "**/*.*",
23+ - LICENSE_GLOB,
24+ - "!**/{android,ios,windows,mac,jest,github,gradle,__*__,docs,jest,example*}/**/*",
25+ - "!**/*.{config,setup}.*",
26+ - "!**/*.{podspec,flow}"
27+ - ]
28+ - });
29+ +
30+ + try {
31+ + cpSync(moduleSourcePath, to, {
32+ + recursive: true,
33+ + filter: (src, dest) => {
34+ + const relativePath = src.replace(moduleSourcePath, '').replace(/^[\\/]/, '');
35+ +
36+ + // Skip certain directories
37+ + if (relativePath.match(/[\\/](android|ios|windows|mac|jest|github|gradle|__.*__|docs|example.*)[\\/]/)) {
38+ + return false;
39+ + }
40+ +
41+ + // Skip certain file types
42+ + if (relativePath.match(/\.(config|setup)\.|\.podspec$|\.flow$/)) {
43+ + return false;
44+ + }
45+ +
46+ + // Include LICENSE files
47+ + if (relativePath.match(/license/i)) {
48+ + return true;
49+ + }
50+ +
51+ + return true;
52+ + }
53+ + });
54+ + } catch (error) {
55+ + throw error;
56+ + }
57+ }
58+
59+ function getModuleName(modulePath) {
0 commit comments