Skip to content
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 ESModules and named exports #838

Closed
ChocolateLoverRaj opened this issue Oct 9, 2020 · 2 comments
Closed

Support ESModules and named exports #838

ChocolateLoverRaj opened this issue Oct 9, 2020 · 2 comments

Comments

@ChocolateLoverRaj
Copy link

  • Operating System: Windows
  • Node.js version: 14
  • fs-extra version: 9.0.1

With the node.js fs module, I like importing specific functions like this:

import { createWriteStream } from 'fs'

It would be nice if fs-extra also had named exports, which are an ESModules feature:

// This is a feature that doesn't currently exist, but it should
import { emptyDir } from 'fs-extra'
@RyanZim
Copy link
Collaborator

RyanZim commented Oct 9, 2020

ESM is still officially experimental in Node, and is based on https://github.com/isaacs/node-graceful-fs, which does not yet have ESM support. I'd like to support this in the future, but it probably won't happen right away. Closing as duplicate of #746.

@RyanZim RyanZim closed this as completed Oct 9, 2020
@lvjiaxuan
Copy link

Dust Falls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants