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

Compatibility issues with latest esbuild version #81

Open
ppedziwiatr opened this issue Oct 24, 2022 · 1 comment
Open

Compatibility issues with latest esbuild version #81

ppedziwiatr opened this issue Oct 24, 2022 · 1 comment

Comments

@ppedziwiatr
Copy link

ppedziwiatr commented Oct 24, 2022

Trying to load metadata file generated with esbuild version 0.15.12 results in an error:
image

This is probably caused by a non compatible metadata file format in the latest versions of the esbuid:
image

(i.e. instead if metadata.inputs should be metadata.metafile.inputs.

@ppedziwiatr
Copy link
Author

As a temp workaround:

const result = await build({
    ...buildConfig,
    outfile: './bundles/web.bundle.min.js',
    metafile: true
  }).catch((e) => {
    console.log(e);
    process.exit(1);
  });

  fs.writeFileSync('metadata.json', JSON.stringify({
    inputs: result.metafile.inputs,
    outputs: result.metafile.outputs
  }));

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

1 participant