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 ESM #5

Open
MichaelDeBoey opened this issue Sep 5, 2023 · 2 comments
Open

Support ESM #5

MichaelDeBoey opened this issue Sep 5, 2023 · 2 comments

Comments

@MichaelDeBoey
Copy link

As @ brophdawg11 pointed out in remix-run/indie-stack#255 (comment), it seems that binode is currently CJS only

It looks like binode is CJS only at the moment to it can't pull in the ESM mocks file nor the ESM built file.

@kentcdodds
Copy link
Owner

I'm definitely open to a PR to fix this

@dvnrsn
Copy link

dvnrsn commented Nov 15, 2023

Hey @MichaelDeBoey, in the example binode is given the node flag --require which of course is not going to work anymore than running node --require ./mocks/index.js when package.json specifies type: module. But it works fine for me with the --import flag which is admittedly experimental but probably good enough for development (as seen in the indie stack "dev")

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