mirror of https://github.com/waku-org/js-waku.git
Re-introduce cjs build
This commit is contained in:
parent
53a3f7fcbf
commit
ebbb0a2713
|
@ -6,7 +6,8 @@
|
||||||
"exports": {
|
"exports": {
|
||||||
".": {
|
".": {
|
||||||
"types": "./dist/esm/index.d.ts",
|
"types": "./dist/esm/index.d.ts",
|
||||||
"import": "./dist/esm/index.js"
|
"import": "./dist/esm/index.js",
|
||||||
|
"require": "./dist/cjs/index.js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
@ -23,6 +24,7 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prepare": "husky install",
|
"prepare": "husky install",
|
||||||
"build": "rimraf ./dist; run-s build:**",
|
"build": "rimraf ./dist; run-s build:**",
|
||||||
|
"build:cjs": "tsc --module commonjs --outDir dist/cjs",
|
||||||
"build:esm": "tsc && node build-scripts/fix-imports.js",
|
"build:esm": "tsc && node build-scripts/fix-imports.js",
|
||||||
"build:umd": "rollup --config rollup.config.js -- dist/esm/index.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",
|
"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": [
|
"files": [
|
||||||
"dist/esm",
|
"dist/esm",
|
||||||
|
"dist/cjs",
|
||||||
"dist/umd",
|
"dist/umd",
|
||||||
"src/*.ts",
|
"src/*.ts",
|
||||||
"src/lib/**/*.ts",
|
"src/lib/**/*.ts",
|
||||||
|
|
Loading…
Reference in New Issue