New answers tagged

3 votes
Accepted

Is there a way to define a JS library that will use a CDN as a fallback

Use hook_library_info_build to declare the library dynamically and use PHP's file_exists to detect if the local file exists.
  • 3,643

Top 50 recent answers are included