-
-
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
Support named exports in mjs files #2634
Comments
Tangentially related to gulpjs/rechoir#43 - the idea is that our |
My workaround for import gulp from 'gulp';
const { series, parallel, src, dest, task } = gulp; |
Well of course that's the way to get this done for now. |
@phated Node supports having different entrypoints for import and require. Thus you could have an index.mjs for import and an index.cjs for require (backward compatibility). See https://nodejs.org/dist/latest-v19.x/docs/api/packages.html#package-entry-points for reference. |
I've added this in #2760 but I have an outstanding question on if something special needs to happen to support the |
Using
gulpfile.esm
I can do:When using
gulpfile.mjs
, this doesn't work because doesn't officially export the propertiessrc
,dest
, etc.Was wondering if there is any interest to support this, maybe in v5?
The text was updated successfully, but these errors were encountered: