http-vue-loader
http-vue-loader copied to clipboard
Added support for data-urls, text-scheme and inline SFCs
Added support for data-urls:
- '/index.vue' is not appended to data-urls
- baseURI is empty to not include a base tag for data-urls
Added support for text-scheme:
- If URL start with "text:" the function does no XMLHttpRequest but uses the following text direct as SFC content
- If URL start with "#" its assumed that it is an element id of an inline script element that contains SFC content.
Data-URLs and Text-Method are really useful when you dont want to make extra web requests because you already have the complete content of a vue sfc.
I use this in combination with PHP to pre-include all needed components. This is much more useful than only including a local "text/x-template" because a full vue component SFC can also have scripts and styles.
@FranckFreiburger Do you plan to merge this pull request ?
This could be used to implement a live component editor playground (code on left, rendered component on right).
Well, now vue3-sfc-loader
is there, maybe it makes much sense to make it support vue2 ...