Add ability to load external modules

Created on 25 February 2024, 4 months ago
Updated 11 March 2024, 4 months ago

Problem/Motivation

I'm trying to load modules from a CDN, in particular pako with the following URL
https://unpkg.com/pako@2.1.0/dist/pako.esm.mjs
but I get an error since the module can only handle internal URLs.

Steps to reproduce

Define a external module in the MODULE.libraries.yml, for example:

pako:
  js:
    https://unpkg.com/pako@2.1.0/dist/pako.esm.mjs:
      type: external
      minified: true
      attributes:
        data-importmap-name: 'pako'

Proposed resolution

When the library is external just use the URL given in the definition.

Remaining tasks

Code

User interface changes

API changes

Data model changes

✨ Feature request
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ͺπŸ‡ΈSpain rodrigoaguilera Barcelona

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024