-
Notifications
You must be signed in to change notification settings - Fork 19
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
ASSETS #1
Comments
Use project reference to compiles your script in CJS and the rest of your lib in ESM. It's the strategy implemented by keycloakify and react-dsfr. |
Confused notes about module publishing:If you don't have any dependencies or it's not important if your dependency are duplicated or you dependencies are only released in CJS and you are not levraging import().then(..): If your module has no scripts (you do not expose CLI tools) and you don't care about suporting node in type: module mode (MUI dosen't). It's OK for a react library for example. You can just release in ESM (just by setting target ES6) You want to support every environement including node in "type: module" and you have dependencies that release both in EJS and ESM that can't be duplicated but you don't use export default. If you are in the previous case AND you use export default. Then it's you must list your export like Now if you want that, on node async import work as well then you have to publish a Real ESM distribution standard compliant. If your package need async features |
No description provided.
The text was updated successfully, but these errors were encountered: