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.03k stars 116 forks source link

Query Strings in module filepath are treated as part of the exension #182

Closed BenWoodford closed 4 months ago

BenWoodford commented 5 months ago

Describe the bug

If you try to load a module at say... "component.vue?date=2024.02.04" for cache-busting reasons it will fail, as the loader will assume the extension is ".04" not" .vue".

To Reproduce See above

Expected behavior The loader should ignore anything after (and including) a "?"

Versions

FranckFreiburger commented 4 months ago

additionally, /main.vue?a=/foo will also fail because Path.dirname('/main.vue?a=/foo') returns /main.vue?a= instead of /