Skip to content

Commit

Permalink
fix: "Dynamic require of "os" is not supported"
Browse files Browse the repository at this point in the history
  • Loading branch information
northernCold committed May 8, 2024
1 parent c934e67 commit 209530a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tsup.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
import type { Options } from 'tsup'

export default <Options>{
banner: ({ format }) => {
if (format === 'esm') {
return {
js: `import {createRequire as __createRequire} from 'module';var require=__createRequire(import\.meta.url);`,
};
}
},
entryPoints: [
'src/*.ts',
],
Expand Down

0 comments on commit 209530a

Please sign in to comment.