From d2703d081e775aa45a502843cdaaf9b8dabbfd84 Mon Sep 17 00:00:00 2001 From: Franck Royer Date: Tue, 26 Jul 2022 14:59:48 +1000 Subject: [PATCH] feat!: remove cjs build --- package.json | 6 +----- rollup.cjs.config.js | 21 --------------------- 2 files changed, 1 insertion(+), 26 deletions(-) delete mode 100644 rollup.cjs.config.js diff --git a/package.json b/package.json index 74714ac600..61a7f0e6d2 100644 --- a/package.json +++ b/package.json @@ -3,13 +3,11 @@ "version": "0.24.0", "description": "TypeScript implementation of the Waku v2 protocol", "types": "./dist/esm/index.d.ts", - "main": "./dist/cjs/index.cjs", "module": "./dist/esm/index.js", "exports": { ".": { "types": "./dist/esm/index.d.ts", - "import": "./dist/esm/index.js", - "require": "./dist/cjs/index.cjs" + "import": "./dist/esm/index.js" } }, "type": "module", @@ -27,7 +25,6 @@ "prepare": "husky install", "build": "rimraf ./dist; run-s build:**", "build:esm": "tsc && node build-scripts/fix-imports.js", - "build:cjs": "rollup --config rollup.cjs.config.js -- dist/esm/index.js", "build:umd": "webpack --config webpack.umd.config.cjs", "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", "size": "npm run build && size-limit", @@ -157,7 +154,6 @@ }, "files": [ "dist/esm", - "dist/cjs", "dist/umd", "src/*.ts", "src/lib/**/*.ts", diff --git a/rollup.cjs.config.js b/rollup.cjs.config.js deleted file mode 100644 index 7c8f189ab3..0000000000 --- a/rollup.cjs.config.js +++ /dev/null @@ -1,21 +0,0 @@ -import { nodeResolve } from "@rollup/plugin-node-resolve"; -import commonjs from "@rollup/plugin-commonjs"; -import json from "@rollup/plugin-json"; -import nodePolyfills from "rollup-plugin-polyfill-node"; - -export default { - output: { - file: "dist/cjs/index.cjs", - format: "cjs", - name: "waku", - }, - plugins: [ - commonjs(), - json(), - nodePolyfills(), - nodeResolve({ - browser: true, - preferBuiltins: false, - }), - ], -};