Skip to content

Commit

Permalink
fix(build): delete optionalDependencies before install
Browse files Browse the repository at this point in the history
  • Loading branch information
johnlindquist committed Oct 16, 2024
1 parent e588092 commit 9279a05
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 25 deletions.
16 changes: 16 additions & 0 deletions build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,22 @@ switch (platform) {

console.log('Building with config');
try {
const uninstallDeps = external();
console.log(`Removing external dependencies: ${uninstallDeps.join(', ')} before @electron/rebuild kicks in`);
if (uninstallDeps.length > 0) {
// Uninstalling with pnpm was breaking, attempting npm?
const command = `npm uninstall ${uninstallDeps.join(' ')}`;
console.log(`Running: ${command}`);
execSync(command, {
stdio: 'inherit',
});
}

// const { stdout, stderr } = await exec(`npx electron-rebuild`);
// console.log({
// stdout,
// stderr,
// });
const result = await build({
config,
publish,
Expand Down
25 changes: 0 additions & 25 deletions scripts/build-exclude-platform-externals.ts

This file was deleted.

0 comments on commit 9279a05

Please sign in to comment.