feat!: remove cjs build

This commit is contained in:
Franck Royer 2022-07-26 14:59:48 +10:00 committed by fryorcraken.eth
parent 4054f6a751
commit d2703d081e
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
2 changed files with 1 additions and 26 deletions

View File

@ -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",

View File

@ -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,
}),
],
};