Commit 179e3d04 authored by Will Cory's avatar Will Cory Committed by GitHub

Merge pull request #5045 from ethereum-optimism/willc/atst-seperate-react

feat(atst): Seperate react into a different build target
parents 33e3fcdd ca9ae003
---
'@eth-optimism/atst': minor
---
Move react api to @eth-optimism/atst/react so react isn't required to run the core sdk
...@@ -6,6 +6,20 @@ ...@@ -6,6 +6,20 @@
"types": "src/index.ts", "types": "src/index.ts",
"module": "dist/index.cjs", "module": "dist/index.cjs",
"license": "MIT", "license": "MIT",
"exports": {
".": {
"types": "./src/index.ts",
"default": "./dist/index.js",
"import": "./dist/index.js",
"require": "./dist/index.cjs"
},
"./react": {
"types": "./src/react.ts",
"default": "./dist/react.js",
"import": "./dist/react.js",
"require": "./dist/react.cjs"
}
},
"bin": { "bin": {
"atst": "./dist/cli.js" "atst": "./dist/cli.js"
}, },
......
...@@ -28,5 +28,3 @@ export type { AttestationCreatedEvent } from './types/AttestationCreatedEvent' ...@@ -28,5 +28,3 @@ export type { AttestationCreatedEvent } from './types/AttestationCreatedEvent'
export type { AttestationReadParams } from './types/AttestationReadParams' export type { AttestationReadParams } from './types/AttestationReadParams'
export type { DataTypeOption } from './types/DataTypeOption' export type { DataTypeOption } from './types/DataTypeOption'
export type { WagmiBytes } from './types/WagmiBytes' export type { WagmiBytes } from './types/WagmiBytes'
// react
export * from './react'
import { ethers } from 'ethers' import { ethers } from 'ethers'
import { Address } from 'wagmi' import type { Address } from '@wagmi/core'
import { ATTESTATION_STATION_ADDRESS } from '../constants/attestationStationAddress' import { ATTESTATION_STATION_ADDRESS } from '../constants/attestationStationAddress'
import { abi } from '../lib/abi' import { abi } from '../lib/abi'
......
import { BigNumber } from 'ethers' import { BigNumber } from 'ethers'
import { Address } from 'wagmi' import type { Address } from '@wagmi/core'
import { DataTypeOption } from './DataTypeOption' import { DataTypeOption } from './DataTypeOption'
import { WagmiBytes } from './WagmiBytes' import { WagmiBytes } from './WagmiBytes'
......
...@@ -10,7 +10,7 @@ export default defineConfig({ ...@@ -10,7 +10,7 @@ export default defineConfig({
* *
* @see https://tsup.egoist.dev/#building-cli-app * @see https://tsup.egoist.dev/#building-cli-app
*/ */
entry: ['src/index.ts', 'src/cli.ts'], entry: ['src/index.ts', 'src/cli.ts', 'src/react.ts'],
outDir: 'dist', outDir: 'dist',
target: 'es2021', target: 'es2021',
// will create a .js file for commonjs and a .cjs file for esm // will create a .js file for commonjs and a .cjs file for esm
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment