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

Build script to setup ESM/CJS module exports #384

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gfortaine
Copy link

No description provided.

MultiselectPrompt,
AutocompletePrompt,
AutocompleteMultiselectPrompt,
ConfirmPrompt

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be better as named exports.

],
"scripts": {
"start": "node lib/index.js",
"prebuild": "rm -rf dist",
"build": "tsc -p ./tsconfig.cjs.json && tsconfig-to-dual-package ./tsconfig.cjs.json",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you're interested, pkgroll offers this with zero-config.

@longnguyen2004
Copy link

How is this going? prompts isn't working with ts-node-esm, so I'd really want an ESM version of this library

@marckraw
Copy link

Yeah, same, would like to use it with native esm ;)

@ctsstc
Copy link

ctsstc commented Nov 30, 2023

Is there any temporary solution for now to utilize this in an ESM environment until support is added? I would prefer to avoid build steps or transpilation if possible on the consuming side.

I tried to switch my script over to cjs, but then I lose top level awaits :(

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

Successfully merging this pull request may close these issues.

5 participants