-
Notifications
You must be signed in to change notification settings - Fork 85
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
Unexpected token import #69
Comments
Hi @lemonbuzz I think you are referencing the ES6 class directly. Please use the transpiled Here is a link in case you wanna take it directly from there: Download and save that in your |
Works!!! Thank you very much for the fast response! Honestly when i saw the code i was a bit perplexed as I never saw classes like that in JS..only encountered the prototype based "classes"...Mind to explain this? What is the ES6 class? |
Glad it worked out :) You are not too far when you say 'prototype based "classes". The 'class' you see in this repo is kinda the same thing. Classes are introduced in ECMAScript 6 and are syntactical sugar over JavaScript's existing prototype-based inheritance. You can read more here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes |
I am trying to use this plugin..But it throws me this error in the console:
"Uncaught SyntaxError: Unexpected token import" @ line 2 in Timer.js
I don't know whats wrong...
I don't have a very specific or different working tree...
Project/
├── action
│ ├── CommonAction.php
│ ├── DAO
│ │ ├── Connection.php
│ │ ├── dbInfo.php
│ │ └── UserDAO.php
│ └── IndexAction.php
├── index.php
├── js
│ ├── constants.js
│ ├── index.js
│ ├── Timer.js
│ ├── util.js
│ └── utils.js
└── stylesheets
└── style.css
Some help would be cool :D
The text was updated successfully, but these errors were encountered: