-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Usage in a TypeScript project #2
Comments
Fixed using this syntax, not very nice...
|
What about |
breaks too
|
One last thing that you could potentially try is: import Spritz from 'spritz.js/dist/spritz.module.js' Please let me know what the output is. |
|
After having a little digging, the issue seems related with the way Typescript deals with modules import: microsoft/TypeScript#2719 I'm not sure if the problem really is with Typescript itself, or the tool I use to bundle the library (rollup). I don't personally use Typescript, but according the link above, one other way to write the fix you've found is: import {default as Spritz} from "spritz.js"; |
Nice, it works ! |
Spoken too quickly.
|
I am in an Angular project coded in TypeScript.
import { Spritz } from 'spritz.js';
Simple loading spritz.js using ES6 syntax, and i got this error :
The text was updated successfully, but these errors were encountered: