I wanted to use the #webpack Dynamic Imports, but it fails to import a file dynamically. It is requesting a file called https://d33wubrfki0l68.cloudfront.net/bundles/248.js
, but the CDN renamed it to something else and I get the following error:
ChunkLoadError: Loading chunk 123 failed.
The error could be seen here when you scroll to the “ Accelerate your vehicle sharing business” section: https://feature-build--wundermobility-com.netlify.app/
.
For more context: I am trying to lazy load the animation library, Lottie.
const getLottie = async () => {
bodymovin = import('lottie-web')
return bodymovin
}
getLottie().then((bm) => {
initLottie()
...
})