gruhn / vue-qrcode-reader

A set of Vue.js components for detecting and decoding QR codes.
https://gruhn.github.io/vue-qrcode-reader
MIT License
2.09k stars 335 forks source link

docs(README): fix umd script link #369

Closed Sec-ant closed 1 year ago

Sec-ant commented 1 year ago

Fix #367

Personally I think index.umd.js or /umd/index.js may be better options, as some cloud services fail to set the proper content-type for .cjs extensions (ref). And vue-qrcode-reader occurs twice in the link, seems a little lengthy.

UPKG will mark .cjs with the content type of text/plain:

![image](https://github.com/gruhn/vue-qrcode-reader/assets/10386119/e291e02c-e54b-457c-8ba2-d8f809dc817e)

jsDelivr will mark it with application/node:

![image](https://github.com/gruhn/vue-qrcode-reader/assets/10386119/836c31c9-4eda-40ce-99fb-0bb25ea71045)
netlify[bot] commented 1 year ago

Deploy Preview for vue-qrcode-reader ready!

Name Link
Latest commit 14a233def76ab2c12ee28085891477c834c9c60e
Latest deploy log https://app.netlify.com/sites/vue-qrcode-reader/deploys/64f825d27bdeb80007c52dc3
Deploy Preview https://deploy-preview-369--vue-qrcode-reader.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

gruhn commented 1 year ago

Personally I think index.umd.js or /umd/index.js may be better options, as some cloud services fail to set the proper content-type for .cjs extensions

Absolutely. That totally breaks the component for non-npm users. Unfortunately, that's what Vite is doing by default. That's a bit surprising to me since the purpose of UMD is to be both CommonJS and script compatible. Anyway, merging for now, thanks.

github-actions[bot] commented 1 year ago

:tada: This PR is included in version 5.3.5 :tada:

The release is available on:

Your semantic-release bot :package::rocket: