bundle-require icon indicating copy to clipboard operation
bundle-require copied to clipboard

Latest esbuild removes watch flag in build option

Open otakustay opened this issue 1 year ago • 0 comments

According to release notes of v0.17.0, watch option is removed and it cause bundle-require to error:

✘ [ERROR] Invalid option in build() call: "watch"

    /Users/otakustay/Develop/reskript/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:255:12:
      255 │       throw new Error(`Invalid option ${where}: ${quote(key)}`);
          ╵             ^

    at checkForInvalidFlags (.node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:255:13)
    at flagsForBuildOptions (.node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:457:3)
    at buildOrContextContinue (.node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1009:9)
    at .node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:983:11

To be compatible with multiple version of esbuild, maybe we can make a new option, allow users to pass esbuild.build function directly?

otakustay avatar Jan 25 '23 14:01 otakustay