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
.mjs extension invalid for Angular/Typescript #14
Comments
It's super hacky, but we run the following command to create the
(Find all the .mjs files in the package, copy to .js then replace 'mjs' to 'js' in those files) |
Relevant TypeScript issue: microsoft/TypeScript#27957 |
Sorry for the late reply -- I received this when I was on vacation, and I'm just now seeing it. It's unfortunate that TypeScript doesn't support I think the best path forward is to let these tools know that they're not compatible with libraries you want to use, and if enough people do that then TS will surely add support.
This is actually non-standard syntax, it's node-specific syntax. To use ES modules in browsers you have to supply a full URL. I'd take a look at this article if you haven't seen it already: |
Hi,
I've been attempting to use this package, but as the files are
.mjs
, angular/typescript are unable to use them, we get the following errors:We are using Angular 6 (Typescript).
Please can this package be converted to use
.js
rather than using.mjs
? You might need to provide both .mjs/.js as this package will be used in other projects?Is there a reason why you didn't opt for the standard
import {IdleQueue} from 'idlize'
syntax?Having said that, I'm looking forward to using this (and blogging about it) on the work we're doing to increase performance on our site. Great work.
Thanks,
The text was updated successfully, but these errors were encountered: