Skip to content
This repository was archived by the owner on Jan 3, 2023. It is now read-only.
This repository was archived by the owner on Jan 3, 2023. It is now read-only.

Unable to run "@angular/compiler-cli/linker/babel" from ESBuild #11

Description

@arobinson

Not sure if this is going to be supported, but I'm trying to be able to run the Angular compiler linker for Babel from ESBuild.

My esbuild config (esbuild.config.mjs file):

import * as path from 'path';
import babel from 'esbuild-plugin-babel';
...
export default {
  plugins: [
    babel({
      filter: /.*/,
      namespace: '',
      config: {
        sourceMaps: true,
        plugins: ['@angular/compiler-cli/linker/babel']
      }
    })
  ]
};

Error:

[BABEL]: You appear to be using a native ECMAScript module plugin, which is only supported when running Babel asynchronously. (While processing: /Users/andrew/.cache/bazel/f355b5a713f2f1fa25bb9ca98af4bac6/sandbox/darwin-sandbox/586/execroot/rules_js_ngc/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@angular+compiler-cli@13.3.11_2bg7cmqgoal4utdjle3uiszux4/node_modules/@angular/compiler-cli/bundles/linker/babel/index.js)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions