Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENOBUFS failure with write: false #228

Closed
alexey-detr opened this issue Jul 6, 2020 · 1 comment
Closed

ENOBUFS failure with write: false #228

alexey-detr opened this issue Jul 6, 2020 · 1 comment

Comments

@alexey-detr
Copy link

Thanks for your amazing job! I'm really inspired with esbuild and trying to integrate it into a jest transform to optimize our unit-testing pipeline.

If you'll try to build an in-memory write: false bundle synchronously esbuild fails with

spawnSync .../node_modules/esbuild/bin/esbuild ENOBUFS

Unfortunately jest supports only sync transformers so it's not an option to switch to an async API (which acutally works just fine).
My build config:

const { buildSync } = require('esbuild');

module.exports = {
  process(content, filename) {
    const { outputFiles } = buildSync({
      entryPoints: [filename],
      bundle: true,
      loader: {
        '.js': 'jsx',
        '.tsx': 'tsx',
        '.scss': 'text',
      },
      platform: 'node',
      format: 'cjs',
      target: 'es2019',
      write: false,
    });
    // ...
  },
};
@evanw evanw closed this as completed in c7e2ae0 Jul 6, 2020
@evanw
Copy link
Owner

evanw commented Jul 6, 2020

Thanks so much for reporting this. This should be fixed in version 0.5.23.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants