Skip to content

Commit

Permalink
fix: Try to fix Dynamic require of "child_process" is not supported II
Browse files Browse the repository at this point in the history
  • Loading branch information
sebbo2002 committed Sep 9, 2024
1 parent 94ceb4c commit 96c4a29
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
12 changes: 7 additions & 5 deletions package-lock.json

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

6 changes: 6 additions & 0 deletions tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ export default defineConfig({
'src/bin/cli.ts',
'src/bin/start.ts'
],
esbuildOptions(options) {
options.banner = {
js: 'import { createRequire as topLevelCreateRequire } from \'module\';' +
'const require = topLevelCreateRequire(import.meta.url);'
};
},
external: [...Object.keys(pkg.devDependencies), 'semantic-release'],
noExternal: Object.keys(pkg.dependencies),
format: ['esm'],
Expand Down

0 comments on commit 96c4a29

Please sign in to comment.