-
Notifications
You must be signed in to change notification settings - Fork 22
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
[Vue] Error loading module #8
Comments
Temporaly solution to fix: mounted() {
const element = document.createElement('script');
element.src = 'https://rawgit.com/jeanlescure/short-unique-id/master/dist/short-unique-id.min.js';
element.setAttribute('async', 'true');
document.body.appendChild(element);
} And add in function on const ShortUniqueId = window['short-unique-id'].default;
const uid = new ShortUniqueId();
uid.randomUUID(10).toUpperCase(); |
The
which means that any ES6 import will use the raw (pre-transpiled) js file. I used class properties for development, as evidenced by my dev dependency:
This is not a problem for projects that implement a plugin for transpiling class properties, but will cause the reported error otherwise. The quickest workaround for versions < 2.0.5 is to add a plugin such as For v2.0.6 I'll work on refactoring out the usage of class properties. |
@matiaslopezd version 2.0.6 is out now which should allow you to use the ES6 module import without error. Cheers 🍾 |
Hi again, I have a problem using in Vue.
Import
Error
The text was updated successfully, but these errors were encountered: