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

Default import unavailable since 2.1.0 #42

Closed
adriaanmeuris opened this issue Jan 17, 2023 · 1 comment
Closed

Default import unavailable since 2.1.0 #42

adriaanmeuris opened this issue Jan 17, 2023 · 1 comment

Comments

@adriaanmeuris
Copy link

From the readme:

// hybrid module, import or require() both work
import { mkdirp } from 'mkdirp'
// or:
const { mkdirp } = require('mkdirp')

In version 2.0.0:

import { mkdirp } from 'mkdirp';
console.log(typeof mkdirp); // function

Since version 2.1.0:

import { mkdirp } from 'mkdirp';
console.log(typeof mkdirp); // undefined
@isaacs
Copy link
Owner

isaacs commented Jan 17, 2023

Yep, missed that one in the whole "hybrid module without a .default dangly bit" update. Have to also manually attach the mkdirp member. Sorry, fixed now.

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

2 participants