diff --git a/configs/jsactions/rollup-plugin-collect-dependencies.js b/configs/jsactions/rollup-plugin-collect-dependencies.js index 82e055c13..e3ac7232c 100644 --- a/configs/jsactions/rollup-plugin-collect-dependencies.js +++ b/configs/jsactions/rollup-plugin-collect-dependencies.js @@ -177,7 +177,8 @@ async function copyJsModule(moduleSourcePath, to) { "!**/{android,ios,windows,mac,jest,github,gradle,__*__,docs,jest,example*}/**/*", "!**/*.{config,setup}.*", "!**/*.{podspec,flow}" - ] + ], + overwrite: true }); } diff --git a/configs/jsactions/rollup.config.js b/configs/jsactions/rollup.config.js index 2e1817312..b60176311 100644 --- a/configs/jsactions/rollup.config.js +++ b/configs/jsactions/rollup.config.js @@ -85,14 +85,20 @@ export default async args => { mkdirSync(path, { recursive: true }); await copyAsync( join(dirname(require.resolve("fbjs")), "lib", "invariant.js"), - join(path, "invariant.js") + join(path, "invariant.js"), + { + overwrite: true + } ); } else if (args.configProject === "nanoflowcommons") { // `invariant` is being used silently by @react-native-community/geolocation; it is not listed as a dependency nor peerDependency. // https://github.dev/react-native-geolocation/react-native-geolocation/blob/1786929f2be581da91082ff857c2393da5e597b3/js/implementation.native.js#L13 await copyAsync( dirname(require.resolve("invariant")), - join(outDir, "node_modules", "invariant") + join(outDir, "node_modules", "invariant"), + { + overwrite: true + } ); }