Skip to content

Commit f086d8c

Browse files
Merge pull request #1730 from NativeScript/vladimirov/remove-node-modules
Remove node_modules when preparing nativescript plugins
2 parents bc80be9 + e2ccd8f commit f086d8c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/services/plugins-service.ts

+2
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ export class PluginsService implements IPluginsService {
131131
platformData.platformProjectService.preparePluginNativeCode(pluginData).wait();
132132

133133
shelljs.rm("-rf", path.join(pluginDestinationPath, pluginData.name, "platforms"));
134+
// Remove node_modules of the plugin. The destination path should have flattened node_modules.
135+
shelljs.rm("-rf", path.join(pluginDestinationPath, pluginData.name, constants.NODE_MODULES_FOLDER_NAME));
134136

135137
// Show message
136138
this.$logger.out(`Successfully prepared plugin ${pluginData.name} for ${platform}.`);

0 commit comments

Comments
 (0)