Skip to content

Commit

Permalink
build dev build overwrite error
Browse files Browse the repository at this point in the history
Summary:
some users and myself were facing a strange issue in development getting the error from esbuild

  errors: [
    {
      detail: undefined,
      id: '',
      location: null,
      notes: [],
      pluginName: '',
      text: 'Refusing to overwrite input file "../plugins/public/ui-debugger/dist/bundle.js" (use "allowOverwrite: true" to allow this)'
    }
  ],

the overwrite flag is set so its likley  a bug in a dependency somewhere, rather than chasign it down this seems to work

fixes https://fb.workplace.com/groups/flippersupport/permalink/1862902277523755/

Reviewed By: mweststrate

Differential Revision: D59145649

fbshipit-source-id: f795ad7bb20bff20fd3b9084fc31f6fa2e21b6bb
  • Loading branch information
Luke De Feo authored and facebook-github-bot committed Jun 28, 2024
1 parent 122fcae commit b3c8ba8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions desktop/pkg-lib/src/runBuild.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ export default async function bundlePlugin(

const bundleConfigs: RunBuildConfig[] = [];

await fs.remove(path.dirname(plugin.entry));

await fs.ensureDir(path.dirname(plugin.entry));
bundleConfigs.push({
pluginDir,
Expand Down

0 comments on commit b3c8ba8

Please sign in to comment.