-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[Feature Request] Use gulp as ESM module #2445
Comments
Thanks for opening this report, but yeah, it falls under a feature request. Unfortunately, this requires a massive rewrite of everything because only an esm module can import an esm module. We are tracking this work at gulpjs/interpret#65. I'll keep this open but lock it so the discussion can happen over there. |
Good news! With some amazing work by @snoack in gulpjs/gulp-cli#214, gulp-cli version 2.3.0 has support for loading ESM modules with the |
What were you expecting to happen?
Run/Use gulp in a "type":"module" context
What actually happened?
Throws an error that
require() of ES modules is not supported.
Please give us a sample of your gulpfile
Terminal output / screenshots
Please provide the following information:
node -v
): v14.2.0npm -v
): 6.14.4gulp -v
): CLI: 3.9.1, local: 4.0.2Additional information
I'm not sure if this is actually a bug report or rather a feature request since the ESM functionality is quite recent in nodejs. I know that I can use "import" statements by renaming the
gulpfile.js
togulpfile.babel.js
but I think it would be nice if it where possible to use imports natively now since node introduced the ESM functionality.Is this something that would be possible with the current implementation of gulp?
The text was updated successfully, but these errors were encountered: