From e410445a058d84e53225d9cdfca9f6d2e054a2cb Mon Sep 17 00:00:00 2001 From: Joseph Garrone Date: Sun, 8 Oct 2023 18:04:37 +0200 Subject: [PATCH] https://github.com/vitejs/vite/pull/13370 --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 3f5f850..b185567 100644 --- a/README.md +++ b/README.md @@ -77,11 +77,9 @@ That's all there is to it! ## CJS only (default) -By default your module release [in CommonJS (CJS)](https://github.com/garronej/ts-ci/blob/8390339b52c98cdbd458d4b945286f999358a1ff/tsconfig.json#L3) with [ESM module interop](https://github.com/garronej/ts-ci/blob/8390339b52c98cdbd458d4b945286f999358a1ff/tsconfig.json#L6). +By default your module release [in CommonJS (CJS)](https://github.com/garronej/ts-ci/blob/8390339b52c98cdbd458d4b945286f999358a1ff/tsconfig.json#L3). You want to avoid this strategy if: -- Your module has peer dependencies that provides both an ESM and CJS distribution. (Example `@mui/material`, `@emotion/react`). [This is a problem specific to Vite - that should be fixed soon](https://github.com/vitejs/vite/pull/13370). - You make use of async imports (`import(...).then(...))`). - You want your module to be usable in node `type: module` mode *AND* you have some `export default` (if you don't have export default it will work just fine).