From ebbb0a27136a476d0aa9bf3113cb94c2356e166c Mon Sep 17 00:00:00 2001 From: Franck Royer Date: Thu, 16 Jun 2022 15:55:04 +1000 Subject: [PATCH] Re-introduce cjs build --- package.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index da6ed0d884..d2f63788b5 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,8 @@ "exports": { ".": { "types": "./dist/esm/index.d.ts", - "import": "./dist/esm/index.js" + "import": "./dist/esm/index.js", + "require": "./dist/cjs/index.js" } }, "type": "module", @@ -23,6 +24,7 @@ "scripts": { "prepare": "husky install", "build": "rimraf ./dist; run-s build:**", + "build:cjs": "tsc --module commonjs --outDir dist/cjs", "build:esm": "tsc && node build-scripts/fix-imports.js", "build:umd": "rollup --config rollup.config.js -- dist/esm/index.js", "build:umd:min": "terser --ecma 6 --compress --mangle -o dist/umd/index.min.js -- dist/umd/index.js && gzip -9 -c dist/umd/index.min.js > dist/umd/index.min.js.gz", @@ -148,6 +150,7 @@ }, "files": [ "dist/esm", + "dist/cjs", "dist/umd", "src/*.ts", "src/lib/**/*.ts",