Skip to content

Commit

Permalink
chore: Update Rollup config (#441)
Browse files Browse the repository at this point in the history
  • Loading branch information
rrr523 authored Dec 21, 2023
1 parent 9c97093 commit 7a652ff
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 36 deletions.
5 changes: 5 additions & 0 deletions .changeset/chilly-fireants-reflect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@bnb-chain/reed-solomon': patch
---

chore: Update Rollup Config - terser
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
"rimraf": "^3.0.2",
"rollup": "^2.79.1",
"rollup-plugin-auto-external": "^2.0.0",
"rollup-plugin-polyfill-node": "^0.10.2",
"rollup-plugin-terser": "^7.0.2"
"rollup-plugin-polyfill-node": "^0.10.2"
}
}
2 changes: 1 addition & 1 deletion packages/reed-solomon/examples/node-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const fileBuffer = fs.readFileSync('./README.md');
const rs = new NodeAdapterReedSolomon();

console.time('cost worker_threads');
console.log('file size', sourceData.length / 1024 / 1024, 'm');
console.log('file size', fileBuffer.length / 1024 / 1024, 'm');
const res = await rs.encodeInWorker(__filename, Uint8Array.from(fileBuffer));
console.log('res', res);
console.timeEnd('cost worker_threads');
Expand Down
3 changes: 3 additions & 0 deletions packages/reed-solomon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,8 @@
"dependencies": {
"@ethersproject/base64": "^5.7.0",
"ethereum-cryptography": "^2.0.0"
},
"devDependencies": {
"@rollup/plugin-terser": "^0.4.4"
}
}
5 changes: 5 additions & 0 deletions packages/reed-solomon/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import commonjs from '@rollup/plugin-commonjs';
import resolve from '@rollup/plugin-node-resolve';
import terser from '@rollup/plugin-terser';
import pkg from './package.json';
// const pathResolve = (p) => path.resolve(__dirname, p);

Expand Down Expand Up @@ -27,6 +28,7 @@ export default async () => {
browser: true,
preferBuiltins: false,
}),
terser(),
],
},

Expand Down Expand Up @@ -64,6 +66,7 @@ export default async () => {
browser: true,
preferBuiltins: false,
}),
terser(),
],
},
{
Expand All @@ -80,6 +83,7 @@ export default async () => {
browser: true,
preferBuiltins: false,
}),
terser(),
],
},
{
Expand All @@ -96,6 +100,7 @@ export default async () => {
browser: true,
preferBuiltins: false,
}),
terser(),
],
},
];
Expand Down
56 changes: 23 additions & 33 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7a652ff

Please sign in to comment.