Skip to content

Commit 9045994

Browse files
committed
fixup! chore: endo compat
1 parent 253680f commit 9045994

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

packages/synthetic-chain/src/cli/cli.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
/**
33
* @file CLI entrypoint, transpiled during build so Node is the env to run it in
44
*/
5-
import '@endo/init/legacy.js';
6-
75
import chalk from 'chalk';
86
import assert from 'node:assert';
97
import { execSync } from 'node:child_process';

packages/synthetic-chain/tsup.config.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ import { defineConfig } from 'tsup';
22

33
export default defineConfig({
44
entry: ['src/cli/cli.ts', 'src/lib/index.ts'],
5+
banner: {
6+
// Some Endo dependencies fail if the global environment is not set up
7+
// before they are imported. This is a workaround to ensure that
8+
// "@endo/init/debug.js" is imported before any other Endo dependencies.
9+
js: 'import "@endo/init/legacy.js";',
10+
},
511
format: ['esm'],
612
dts: true, // Generate declaration file (.d.ts)
713
sourcemap: true,

0 commit comments

Comments
 (0)