Skip to content

Commit bf5862e

Browse files
committed
fix bundler to be compatible with commonJS for safe-sdk
1 parent 6959fa4 commit bf5862e

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

package.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@open-ibc/vibc-core-smart-contracts",
3-
"version": "4.0.7",
3+
"version": "4.0.8",
44
"main": "dist/index.js",
55
"bin": {
66
"verify-vibc-core-smart-contracts": "./dist/scripts/verify-contract-script.js",
@@ -103,6 +103,5 @@
103103
"import": "./dist/utils/constants.js",
104104
"types": "./dist/utils/constants.d.ts"
105105
}
106-
},
107-
"type": "module"
106+
}
108107
}

src/scripts/update-contracts-script.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ async function main() {
1919
let extraContractFactories: Record<string, object> | null = null;
2020
if (extraBindingsPath) {
2121
try {
22-
extraContractFactories = await import(extraBindingsPath);
22+
extraContractFactories = await require(extraBindingsPath);
2323
} catch (e) {
2424
throw new Error(
2525
`Failed to import extra contract factories from ${extraBindingsPath}: ${e}`

tsup.config.ts

+1
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@ export default defineConfig({
2424
sourcemap: true,
2525
clean: true,
2626
outDir: "./dist",
27+
target: "node18",
2728
});

0 commit comments

Comments
 (0)