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

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

Closed BenWoodford closed 9 months ago

BenWoodford commented 9 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 9 months ago

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