vue-shortkey
vue-shortkey copied to clipboard
Support for loading with JavaScript modules in browser
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?