The code works fine in development builds, but when published (in my case with AOT, I didn’t test without), I am getting
l.Control.Draw is not a constructor.
Be prepared. This is uglier than Ted Cruz and Papa John’s bastard baby.
leaflet-draw into your equivalent of
import 'leaflet'; import 'leaflet-draw';
Wherever you have used these imports in your code, replace it with:
declare const L: any;
If you encounter build errors, you can use
// @ts-ignore drawControl: L.Control.Draw;