Skip to content

Commit

Permalink
chore: Add type-extensions build target to ua-utils-evm
Browse files Browse the repository at this point in the history
  • Loading branch information
janjakubnanista committed Nov 25, 2023
1 parent 437a1a3 commit 3c7d4a2
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 13 deletions.
13 changes: 10 additions & 3 deletions packages/utils-evm-hardhat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,16 @@
},
"license": "MIT",
"exports": {
"types": "./dist/index.d.ts",
"require": "./dist/index.js",
"import": "./dist/index.mjs"
".": {
"types": "./dist/index.d.ts",
"require": "./dist/index.js",
"import": "./dist/index.mjs"
},
"./*": {
"types": "./dist/*.d.ts",
"require": "./dist/*.js",
"import": "./dist/*.mjs"
}
},
"main": "./dist/index.js",
"module": "./dist/index.mjs",
Expand Down
1 change: 1 addition & 0 deletions packages/utils-evm-hardhat/src/type-extensions.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'hardhat/types/config'
import { EndpointId } from '@layerzerolabs/lz-definitions'

declare module 'hardhat/types/config' {
Expand Down
32 changes: 22 additions & 10 deletions packages/utils-evm-hardhat/tsup.config.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
import { defineConfig } from 'tsup'

export default defineConfig({
entry: ['src/index.ts'],
outDir: './dist',
clean: true,
dts: true,
sourcemap: true,
splitting: false,
treeshake: true,
format: ['esm', 'cjs'],
})
export default defineConfig([
{
entry: ['src/index.ts'],
outDir: './dist',
clean: true,
dts: true,
sourcemap: true,
splitting: false,
treeshake: true,
format: ['esm', 'cjs'],
},
{
entry: ['src/type-extensions.ts'],
outDir: './dist',
clean: true,
dts: true,
sourcemap: true,
splitting: false,
treeshake: true,
format: ['esm', 'cjs'],
},
])

0 comments on commit 3c7d4a2

Please sign in to comment.