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

fix: "Simple" workflow #385

Closed gruhn closed 12 months ago

gruhn commented 12 months ago

(1) Remove global plugin installation idiom from src/index.ts since Vue.use was removed in Vue 3 and causes an error when actually executed. See:

https://v3-migration.vuejs.org/breaking-changes/global-api.html#a-note-for-plugin-authors

(2) Add an additional build artifact vue-qrcode-reader.umd.js that is just a copy of vue-qrcoder-reader.umd.cjs. Doing a script- tag import of cjs files, doesn't work if the server doesn't also set the Content-Type correctly (as pointed out by @Sec-ant), which is the case with some Unpkg for example. So it seems weird that Vite uses that as the default file type for UMD artifacts. The purpose of UMD is to be both compatible with CommonJS and simple script imports. Let's keep both files for backwards- compatibility for now.

(3) Instead of theh CodePen implementation of the "Simple" demo just use an (even simpler) HTML file stored in the public assets of the Vitepress page.

See: #369 #384

netlify[bot] commented 12 months ago

Deploy Preview for vue-qrcode-reader ready!

Name Link
Latest commit a22ee561c2fefa30b3b6ffe09b0f50205b2ff872
Latest deploy log https://app.netlify.com/sites/vue-qrcode-reader/deploys/651e9a6bac46bf000895ea06
Deploy Preview https://deploy-preview-385--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.

github-actions[bot] commented 12 months ago

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

The release is available on:

Your semantic-release bot :package::rocket: