Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for loading with JavaScript modules in browser #105

Open
Dumbris opened this issue Jan 7, 2020 · 0 comments
Open

Support for loading with JavaScript modules in browser #105

Dumbris opened this issue Jan 7, 2020 · 0 comments

Comments

@Dumbris
Copy link

Dumbris commented Jan 7, 2020

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants