Skip to content

Commit

Permalink
refactor(ses): make go vroom faster
Browse files Browse the repository at this point in the history
  • Loading branch information
leotm authored and kriskowal committed Dec 5, 2023
1 parent ececb6f commit 0a649b8
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions packages/ses/scripts/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,21 @@ const main = async () => {
console.log(`Minified bundle size: ${terse.length} bytes`);

await fs.promises.mkdir('dist', { recursive: true });
await write('dist/ses.cjs', versionedBundle);
await write('dist/ses.mjs', versionedBundle);
await write('dist/ses.umd.js', versionedBundle);
await write('dist/ses.umd.min.js', terse);

await write('dist/lockdown.cjs', versionedBundle);
await write('dist/lockdown.mjs', versionedBundle);
await write('dist/lockdown.umd.js', versionedBundle);
await write('dist/lockdown.umd.min.js', terse);

const bundles = [
'dist/ses.cjs',
'dist/ses.mjs',
'dist/ses.umd.js',
'dist/lockdown.cjs',
'dist/lockdown.mjs',
'dist/lockdown.umd.js',
];
const terses = ['dist/ses.umd.min.js', 'dist/lockdown.umd.min.js'];

await Promise.all([
...bundles.map(dest => write(dest, versionedBundle)),
...terses.map(dest => write(dest, terse)),
]);
};

main().catch(err => {
Expand Down

0 comments on commit 0a649b8

Please sign in to comment.