FranckFreiburger / http-vue-loader

load .vue files from your html/js
MIT License
1.48k stars 273 forks source link

Load all components within a folder #104

Closed davidsneighbour closed 3 years ago

davidsneighbour commented 4 years ago

I have quite a lot of components in various folders. Is it possible to somehow load all files in a folder and map them to their filename as component name? Is that a useful improvement?

Something along the lines of

  components: {
    '*': httpVueLoader('/components/*.vue'),
  },
pal-software commented 4 years ago

I think it's task not for httpVueLoader, because client javascript httpVueLoader have not access to server or local filesystem & can't enumerate files.

If your files with components placed on the some web-server (with php for example), then you can write server-side function & make list of components dynamically.

FranckFreiburger commented 3 years ago

This feature can be done in userland

davidsneighbour commented 3 years ago

Can you go into depth on that? I don't have an idea what you mean by "userland" in connection with a Vue app.