bundle-require
bundle-require copied to clipboard
Tmp .mjs file in the current directory breaks other tools
Sometimes I found issues like that during heavy parallel builds (prettier + jest + eslint + tsc + tsup):
build 01-Oct-2022 21:31:04 xxx:lint:
build 01-Oct-2022 21:31:04 xxx:lint: Oops! Something went wrong! :(
build 01-Oct-2022 21:31:04 xxx:lint:
build 01-Oct-2022 21:31:04 xxx: ESLint: 8.24.0
build 01-Oct-2022 21:31:04 xxx:
build 01-Oct-2022 21:31:04 xxx:lint: Error: ENOENT: no such file or directory, open '/home/builder/yyyy/packages/zzzz/tsup.config.bundled_q9ps7cjhg0j.mjs'
Looks like bundle-require creates & immediately removes tsup.config.bundled_q9ps7cjhg0j.mjs in the current dir instead of node_modules/.cache or /tmp/xxx. It's ok for me ('/tsup.config.bundled_*.mjs' in .eslintignore), but may lead to crazy side effects in more complicated scenarios.