jsdelivr / jsdelivr

A free, fast, and reliable Open Source CDN for npm, GitHub, Javascript, and ESM

Home Page:https://www.jsdelivr.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ESM Module for plupload@2.3.9 loading in debug mode

Chaosxmk opened this issue · comments

Description

When importing the listed script, a bunch of debug text is output into the console:

Instantiating FileInput... [moxie.js:1558:23](https://cdn.jsdelivr.net/npm/plupload@2.3.9/js/moxie.js)
Trying runtime: html5 [moxie.js:1558:23](https://cdn.jsdelivr.net/npm/plupload@2.3.9/js/moxie.js)
	default mode: browser [moxie.js:1558:23](https://cdn.jsdelivr.net/npm/plupload@2.3.9/js/moxie.js)
	selected mode: browser

This is likely caused because the ESM module is loading moxie.js instead of moxie.min.js, which is available as part of the same library.

Affected jsDelivr links

https://cdn.jsdelivr.net/npm/plupload@2.3.9/+esm
https://cdn.jsdelivr.net/npm/plupload@2.3.9/js/moxie.js
https://cdn.jsdelivr.net/npm/plupload@2.3.9/js/moxie.min.js

Response headers

HTTP/2 200 
access-control-allow-origin: *
access-control-expose-headers: *
timing-allow-origin: *
cache-control: public, max-age=31536000, s-maxage=31536000, immutable
cross-origin-resource-policy: cross-origin
x-content-type-options: nosniff
strict-transport-security: max-age=31536000; includeSubDomains; preload
content-type: application/javascript; charset=utf-8
x-jsd-version: 2.3.9
x-jsd-version-type: version
etag: W/"39254-KIYoglwA7WccbsTFVL8ElA9pkYg"
content-encoding: br
accept-ranges: bytes
date: Mon, 26 Feb 2024 19:50:54 GMT
age: 367233
x-served-by: cache-fra-eddf8230087-FRA, cache-yyz4573-YYZ
x-cache: HIT, HIT
vary: Accept-Encoding
alt-svc: h3=":443";ma=86400,h3-29=":443";ma=86400,h3-27=":443";ma=86400
content-length: 48726
X-Firefox-Spdy: h2

Information

  • Device OS: Windows
  • Browser & Version: Firefox 124.0b3
  • Your location: Montreal, Canada

Requisites

  • I performed a cursory search of the issue tracker to avoid opening a duplicate issue.
  • I checked the documentation to understand that the issue I am reporting is not normal behavior.
  • I understand that not filling out this template correctly will lead to the issue being closed.

Additional content

No response

Hi, it is up to the module author to set the correct file either using main or exports field in package.json. Currently, we load https://cdn.jsdelivr.net/npm/plupload@2.3.9/js/plupload.full.min.js

Well, that's worrisome considering that project has been inactive for a while.

You can always access whichever file you prefer by the direct link. That includes ESM mode, by adding /+esm to any URL.