From 7fcbc0191e38f0e367744504dfb73ffb9896148d Mon Sep 17 00:00:00 2001 From: JanSzewczyk Date: Tue, 24 Dec 2024 22:11:58 +0100 Subject: [PATCH] fix(build): fix default exports in ESM --- README.md | 2 ++ package-lock.json | 4 ++-- package.json | 8 +++++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d9d98de..47eeaff 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,8 @@ [![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-%23FE5196?logo=conventionalcommits&logoColor=white)](https://conventionalcommits.org) [![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/JanSzewczyk/prettier-config/blob/main/LICENSE) +--- + [Prettier](https://prettier.io/) shareable configuration. ## 📚 Features diff --git a/package-lock.json b/package-lock.json index 840fae1..d50f35b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@szum-tech/prettier-config", - "version": "1.4.1", + "version": "1.4.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@szum-tech/prettier-config", - "version": "1.4.1", + "version": "1.4.2", "license": "MIT", "dependencies": { "prettier-plugin-packagejson": "^2.5.6", diff --git a/package.json b/package.json index 566c54e..00f012b 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,12 @@ "license": "MIT", "author": "Szum-Tech ", "type": "module", + "exports": { + ".": { + "import": "./dist/index.js", + "require": "./dist/index.cjs" + } + }, "main": "./dist/index.cjs", "module": "./dist/index.js", "files": [ @@ -47,7 +53,7 @@ "typescript": "^5.7.2" }, "peerDependencies": { - "prettier": "^3.4.2" + "prettier": ">=3.0.0" }, "publishConfig": { "access": "public"