FranckFreiburger / vue3-sfc-loader

Single File Component loader for Vue2 and Vue3. Load .vue files directly from your HTML. No node.js environment, no build step.
MIT License
1.19k stars 127 forks source link

Error after load vue3-sfc-loader locally #190

Closed dreambo8563 closed 1 month ago

dreambo8563 commented 7 months ago

Describe the bug

I download the vue3-sfc-loader.js on my local, and run a web server to produce the demo. failed with errors To Reproduce

  1. download the file with curl: curl https://cdn.jsdelivr.net/npm/vue3-sfc-loader/dist/vue3-sfc-loader.js -o vue3-sfc-loader.js
  2. copy the demo code from codepen (https://codepen.io/franckfreiburger/project/editor/AqPyBr)
  3. run a webserver python3 -m http.server 8080
  4. load the page with error : image

    the error navigate to a block of strange code

    image

Expected behavior

no error happen and I can make the demo successfully .

Versions

Additional context

when load the js with CDN as the document write, everything works, I don't know which step make the error happen and what the difference between the file I downloaded and the file on CDN server.

FranckFreiburger commented 2 months ago

Hi dreambo8563,

this part of this file should be: image

maybe an UTF-8 issue when downloading vue3-sfc-loader.js with curl ?