Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update Rollup config #441

Merged
merged 1 commit into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

Loading