Skip to content

Commit

Permalink
feat: tinny pkg works
Browse files Browse the repository at this point in the history
  • Loading branch information
Ansonhkg committed Nov 20, 2024
1 parent 48ee1e8 commit 24263e2
Show file tree
Hide file tree
Showing 123 changed files with 121,937 additions and 294 deletions.
1 change: 1 addition & 0 deletions local-tests/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.js.map
23 changes: 23 additions & 0 deletions local-tests/build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,29 @@ export const build = async () => {
inject: [`./${TEST_DIR}/shim.mjs`],
mainFields: ['module', 'main'],
});

await esbuild.build({
entryPoints: [`${TEST_DIR}/index.ts`],
outfile: `./${TEST_DIR}/index.js`,
bundle: true,
globalName: 'tinnySdk',
plugins: [
nodeExternalsPlugin({
allowList: [
'ethers',
'@lit-protocol/accs-schemas',
'@lit-protocol/contracts',
'crypto',
'secp256k1',
],
}),
],
platform: 'node',
target: 'esnext',
format: 'esm',
inject: [`./${TEST_DIR}/shim.mjs`],
mainFields: ['module', 'main'],
});
};

/**
Expand Down
Loading

0 comments on commit 24263e2

Please sign in to comment.