FranckFreiburger/vue3-sfc-loader

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

BenWoodford opened this issue · 1 comments

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

  • vue3-sfc-loader: 0.8.4

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