I have an angular project (Angular 13) where I use leaflet. In the package.json file, I have:
"leaflet": "^1.7.1",
"leaflet-draw": "^1.0.4",
"leaflet.heat": "^0.2.0",
In my component, I import leaflet via
import * as L from 'leaflet';
Everything works fine and L includes the classes/methods from leaflet-draw and leaflet.heat as well. However, I could not understand how they are imported to the project when I only import 'leaflet'. I know that leaflet plugins do not export anything and they only add their stuff to L namescape of leaflet.
I just want to learn how Leaflet plugins become available even if I only import leaflet.