Add "Load Rivet locally" option due to instability from CDN

Created on 31 March 2025, 4 days ago

Problem/Motivation

There has been some recent instability from the CDN hosting the Rivet library at unpkg.com/rivet-core.

For normal users that aren't frequently accessing an IU website, the website could very easily look broken, while at the same time, developers and admins in the IU Web Community cannot immediately “see” when the CDN is down, because the assets are cached locally in the browser for 356 days via cache control headers from https://unpkg.com/rivet-core@2.8.1/js/rivet.min.js

Proposed resolution

Provide a new checkbox option in theme settings to load Rivet Core assets locally from the Drupal libraries folder. If hosted locally, users would be responsible for keeping the Rivet library up-to-date, so we should also look at ways to install the Rivet Core assets into Drupal libraries folder using composer, so the theme retains minimum version compatibility control and the library is kept up-to-date when the theme is updated.

Remaining tasks

User interface changes

If the Rivet assets are found in the libraries folder, enable a checkbox to load Rivet Core assets locally. If assets are not found, fallback to the CDN.

API changes

Not applicable.

Data model changes

Not applicable.

📌 Task
Status

Active

Version

1.0

Component

Code

Created by

🇪🇨Ecuador jwilson3

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024