Angular with esbuild and vite fails to resolve public.api

87 Views Asked by At

we switched to esbuild with vite in our application via

"builder": "@angular-devkit/build-angular:browser-esbuild"

and now we're getting the following error.

✘ [ERROR] Could not resolve "./public_api"

    node_modules/@company/package/esm2022/package.mjs:4:14:
      4 │ export * from './public_api';

In the node_modules folder there is a package.mjs and a public_api.mjs. When adding the fileextension in the mjs it works, but not without. I was looking for any tsconfig and angular.jsonconfig, but did not find anything.

0

There are 0 best solutions below