vue-link-preload

0.0.1 • Public • Published

Install

npm install vue-link-preload

Usage

import Preload from 'vue-link-preload'

Vue.use(Preload)

// dynamically add single item
// by default the type 'script' is assigned
Vue.addPreloadLink('https://cdnjs.cloudflare.com/ajax/libs/extjs/6.2.0/ext-all.js')

// add multiple items at once
Vue.preloadGroup({
  script: ['https://cdnjs.cloudflare.com/ajax/libs/extjs/6.2.0/ext-all.js', 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js'],
  style: ['https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-beta/css/bootstrap-reboot.min.css'],
  'image': ['https://www.google.nl/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png']
})

API

Vue.addPreloadLink(link,[ type, callback])

Preload single resource.

Vue.preloadGroup(resourseMap)

Preload group of resources of multiple types.

See also

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i vue-link-preload

Weekly Downloads

1

Version

0.0.1

License

MIT

Last publish

Collaborators

  • shershen08