Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/SeregPie/VueInBrowserLoader
Loads a .vue file from the given URL and compiles it to a component directly in the browser.
https://github.com/SeregPie/VueInBrowserLoader
async browser client get http load local url vue
Last synced: about 1 month ago
JSON representation
Loads a .vue file from the given URL and compiles it to a component directly in the browser.
- Host: GitHub
- URL: https://github.com/SeregPie/VueInBrowserLoader
- Owner: SeregPie
- License: mit
- Archived: true
- Created: 2018-03-07T21:14:50.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-09-20T10:22:57.000Z (over 5 years ago)
- Last Synced: 2024-01-08T08:50:28.362Z (5 months ago)
- Topics: async, browser, client, get, http, load, local, url, vue
- Language: JavaScript
- Homepage:
- Size: 16.6 KB
- Stars: 7
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- awesome-vue - VueInBrowserLoader - Loads a .vue file from the given URL and compiles it to a component directly in the browser. (Components & Libraries / Utilities)
- awesome-vue - VueInBrowserLoader - Loads a .vue file from the given URL and compiles it to a component directly in the browser. (Components & Libraries / Utilities)
- awesome-vue - VueInBrowserLoader - Loads a .vue file from the given URL and compiles it to a component directly in the browser. (Components & Libraries / Utilities)
- awesome-vue - VueInBrowserLoader - Loads a .vue file from the given URL and compiles it to a component directly in the browser. (Components & Libraries / Utilities)
- awesome-vue - VueInBrowserLoader - Loads a .vue file from the given URL and compiles it to a component directly in the browser. (Components & Libraries / Utilities)
- awesome-vue - VueInBrowserLoader - Loads a .vue file from the given URL and compiles it to a component directly in the browser. (Components & Libraries / Utilities)
- awesome-vue - VueInBrowserLoader - Loads a .vue file from the given URL and compiles it to a component directly in the browser. (Components & Libraries / Utilities)
- awesome-vue - VueInBrowserLoader - Loads a .vue file from the given URL and compiles it to a component directly in the browser. (Components & Libraries / Utilities)
- awesome-vue - VueInBrowserLoader - Loads a .vue file from the given URL and compiles it to a component directly in the browser. (Components & Libraries / Utilities)
- awesome-vue - VueInBrowserLoader - Loads a .vue file from the given URL and compiles it to a component directly in the browser. (Utilities / Asset Management)
- awesome-vue - VueInBrowserLoader - Loads a .vue file from the given URL and compiles it to a component directly in the browser. (Utilities / Asset Management)
- awesome-vue - VueInBrowserLoader - Loads a .vue file from the given URL and compiles it to a component directly in the browser. (Utilities / Asset Management)
- awesome-vue - VueInBrowserLoader ★4 - Loads a .vue file from the given URL and compiles it to a component directly in the browser. (Utilities / Asset Management)
- awesome-vue - VueInBrowserLoader - Loads a .vue file from the given URL and compiles it to a component directly in the browser. (Components & Libraries / Utilities)
README
# VueInBrowserLoader
Inspired by Franck Freiburger's [http-vue-loader](https://github.com/FranckFreiburger/http-vue-loader).
---
`VueInBrowserLoader(url)`
Loads a `.vue` file from the given URL and compiles it to a component directly in the browser. Already loaded components are cached.
## dependencies
- [Vue](https://github.com/vuejs/vue)
## setup
### npm
```shell
npm install vueinbrowserloader
```### ES module
```javascript
import VueInBrowserLoader from 'vueinbrowserloader';
```### browser
```html
```
## usage
```javascript
new Vue({
components: {
'MyButton': VueInBrowserLoader('/app/components/Button.vue'),'MyDialog': VueInBrowserLoader('/app/components/Dialog'),
// resolves to '/app/components/Dialog/index.vue'
},
/*...*/
});
```---
Use relative URLs.
```html
module.exports = {
components: {
'MyTitleBar': VueInBrowserLoader('./TitleBar.vue'),
// resolves to '/app/components/Dialog/TitleBar.vue''MyButton': VueInBrowserLoader('../Button.vue'),
// resolves to '/app/components/Button.vue'
},
/*...*/
});```
---
Separate files.
```html
```
## todo
- scoped style
- pre-processors
- post-processors