ungap.url-search-params library uses CJS exports

Created on 20 March 2025, 16 days ago

Problem/Motivation

At some time, the CDN link for the URL Search Params polyfill now redirects to https://unpkg.com/@ungap/url-search-params@0.2.2/cjs/index.js . This file is a common JS module, and while it does work in the browser, the "module.exports" logs an error, min.js:376 Uncaught ReferenceError: module is not defined

This has caused some issue with other scripts not working when CSS/JS aggregation is off

Steps to reproduce

1. Install this module.
2. See console error

Proposed resolution

Either self host the min.js file or use another polyfill that's browser compatible. We could use a package.json file to manage the dependency, but the first option seems the easiest

Remaining tasks

Add the min.js file

User interface changes

none

API changes

none

Data model changes

none

πŸ› Bug report
Status

Active

Version

1.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States yonghua

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024