Skip to content

Support ESM #746

Closed
Closed
@RyanZim

Description

@RyanZim

Node v13.2.0+ has experimental ESM (native module) support without any kind of flag. This means that you can now do:

import { readFile } from 'fs'

However, if you try:

import { readFile } from 'fs-extra'

You get an error, because fs-extra is CJS-only. (You cannot export named exports from a CJS file) If we are going to remain a drop-in replacement for fs, we need to support this.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions