vue-shortkey icon indicating copy to clipboard operation
vue-shortkey copied to clipboard

Support for loading with JavaScript modules in browser

Open Dumbris opened this issue 5 years ago • 0 comments

I have a small project, there I'm loading vue and shortkey using browser javascript modules. In HTML I have: <script type="module" src="https://unpkg.com/vue-shortkey" defer></script>

In js file:

import 'https://unpkg.com/vue-shortkey'

Vue.use(window.VueShortkey)

const wsVue = new Vue()

This code works well. But it's not obvious from where window.VueShortkey comes. The option

import ShortKey from 'https://unpkg.com/vue-shortkey'
Vue.use(ShortKey)

looks much cleaner, but it doesn't work with current version.

Could you provide support for js browser modules in your great library?

Dumbris avatar Jan 07 '20 06:01 Dumbris