-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
I can't use modules #859
Comments
It's been almost 2 years and it still hasn't been resolved. Isn't it like one line of code where it's doing require instead of import? |
No, actually, it's a huge change... |
What is it then? |
Also you realise it really doesn't help until everything works. Weakest link in the chain. |
What's the change though? It doesn't seem like it would be a big thing, it's just importing something. Can't you just replace require with await import? I don't understand because my problem is not being able to import so why are changes needed other than how you import? |
Does everything need to be updated to ES6, or what? Also ES modules have been around for 8 years. The time between CJS require and ES modules is greater than the time between ES modules and now. Why wasn't this done 8 years ago? |
I have to import with require and export with module.exports. I've tried changing the file extension to .mjs, in the package.json and changing the type to module but it doesn't work. Maybe in jsconfig I can do something? I have to use modules and I also hate the look of the word require.
The text was updated successfully, but these errors were encountered: