I'm trying to create an <map> element with leaflet.
I have added the dependencies in the aurelia.json file from aurelia-cli, the same as I did already for bootstrap before.
{
"name": "leaflet",
"path": "../node_modules/leaflet/dist",
"main": "leaflet",
"resources": [
"leaflet.css"
]
}
When I run the app with "au run", the leaflet.css file is correctly integrated in the vendor bundle file.
But when trying to require this file in my map element I get the error:
"Unhandled rejection Error: Failed loading required CSS file: leaflet/leaflet.css
The map.html file looks like this:
<template>
<require from="leaflet/leaflet.css"></require>
<div ref="mapNode" style="height: 100%"></div>
</template>
I can't see the difference to the bootstrap package, which works without any problem.
After moving the leaflet dependency before that of bootstrap 4, everything seems to work correctly. github link
Is it possible that bootstrap breaks the requirejs lib or the text plugin?