Widgets in ES Modules

532
1
Jump to solution
03-04-2021 01:24 PM
ScottSteigerwald1
New Contributor

I have some custom widgets I've developed in Typescript. I have the compiled JS file from a TSX file, etc. I'm attempting to bring that into my Angular project that uses ES Modules and have made various edits to my tsconfig file in attempts to support importing my widgets. But I always receive various failures on compile, the latest being "TypeError: Recenter is not a constructor".

How does one use custom widgets in Angular with ES Modules? Am I better off using Angular directives or components for my custom map elements?

0 Kudos
1 Solution

Accepted Solutions
AndyGup
Esri Regular Contributor

Duplicate post - see the github repo for the answer. https://github.com/Esri/jsapi-resources/issues/277

View solution in original post

0 Kudos
1 Reply
AndyGup
Esri Regular Contributor

Duplicate post - see the github repo for the answer. https://github.com/Esri/jsapi-resources/issues/277

0 Kudos