feat!: module & commonjs in prettier

BREAKING CHANGE: support module, and commonjs types
This commit is contained in:
Ismo Vuorinen
2024-08-21 17:50:05 +03:00
parent 02e4f4779c
commit 12ea3688ad
3 changed files with 9 additions and 2 deletions

View File

@@ -13,8 +13,14 @@
"engines": { "engines": {
"node": ">= 18" "node": ">= 18"
}, },
"main": "index.cjs",
"module": "wrapper.mjs",
"exports": {
"import": "./wrapper.mjs",
"require": "./index.cjs"
},
"files": [ "files": [
"index.js", "index.cjs",
"scripts/*" "scripts/*"
], ],
"homepage": "https://github.com/ivuorinen/base-configs/tree/main/packages/prettier-config#readme", "homepage": "https://github.com/ivuorinen/base-configs/tree/main/packages/prettier-config#readme",
@@ -25,7 +31,6 @@
"prettier" "prettier"
], ],
"license": "MIT", "license": "MIT",
"main": "index.js",
"publishConfig": { "publishConfig": {
"access": "public" "access": "public"
}, },

View File

@@ -0,0 +1,2 @@
import config from './index.cjs'
export default config