mirror of https://github.com/status-im/js-waku.git
feat: add esm bundling
This commit is contained in:
parent
d2703d081e
commit
338e3c9964
|
@ -25,6 +25,7 @@
|
|||
"prepare": "husky install",
|
||||
"build": "rimraf ./dist; run-s build:**",
|
||||
"build:esm": "tsc && node build-scripts/fix-imports.js",
|
||||
"build:bundle": "rollup --config rollup.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",
|
||||
|
|
|
@ -5,8 +5,8 @@ import nodePolyfills from "rollup-plugin-polyfill-node";
|
|||
|
||||
export default {
|
||||
output: {
|
||||
file: "dist/umd/index.js",
|
||||
format: "umd",
|
||||
file: "dist/bundle.js",
|
||||
format: "esm",
|
||||
name: "waku",
|
||||
},
|
||||
plugins: [
|
||||
|
|
Loading…
Reference in New Issue