Select to view content in your preferred language

Angular 11 library wrapping es modules

436
1
08-18-2021 07:42 PM
FentonCheng_-_DIT
Emerging Contributor

Has anyone tried wrapping parts of the Javascript API into an Angular library? We use Angular 11 (library still uses ViewEngine; haven't tried Ivy yet). The library can build and works correctly locally. It's then published to our internal repo for other developers to use. A test app using the published library gives errors saying that @arcgis/core can't be found. Ideally, other developers should not need to install @arcgis/core. Is there a way around this?

Versions: Angular 11.2.14, @arcgis/core 4.20.2

0 Kudos
1 Reply
AndyGup
Esri Regular Contributor

It's been a while since I worked with Angular libraries - did you set up a path reference to @arcgis/core in your tsconfig? I remember having some issues with peer dependencies.

0 Kudos