Skip to content

Commit

Permalink
Aug 4, 2024, 1:26 PM
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Aug 4, 2024
1 parent e917745 commit 6ad4041
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default [
input: './src/index.ts', // Your main TypeScript file
output: [
{ file: './dist/index.cjs', format: 'cjs' },
{ file: './dist/index.mjs', format: 'es', onwrite: () => { isMjsOutput = true; } }
{ file: './dist/index.mjs', format: 'es' }
],
plugins: [
// customAliases,
Expand All @@ -61,7 +61,21 @@ export default [
// 'axios',
// 'lodash',
// 'ethers'
// ]
// ],
watch: {
// Set the flag when the .mjs output is being processed
buildStart() {
isMjsOutput = false; // Reset for each build
},
output: {
// Set the flag for .mjs output
file: './dist/index.mjs',
format: 'es',
onwrite: () => {
isMjsOutput = true;
}
}
}
},
{
input: 'src/index.ts',
Expand Down

0 comments on commit 6ad4041

Please sign in to comment.