2024-04-20 16:42:07 +03:00
|
|
|
import esbuild from 'rollup-plugin-esbuild';
|
|
|
|
import { nodeResolve } from '@rollup/plugin-node-resolve';
|
|
|
|
import commonjs from '@rollup/plugin-commonjs';
|
|
|
|
|
|
|
|
const external = ['ethers'];
|
|
|
|
|
|
|
|
const config = [
|
|
|
|
{
|
|
|
|
input: 'typechain-types/index.ts',
|
|
|
|
output: [
|
|
|
|
{
|
|
|
|
file: 'dist/index.js',
|
|
|
|
format: "cjs",
|
|
|
|
esModule: false,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
external,
|
|
|
|
plugins: [
|
|
|
|
esbuild({
|
|
|
|
include: /\.[jt]sx?$/,
|
|
|
|
minify: false,
|
|
|
|
sourceMap: true,
|
2024-10-16 10:38:49 +03:00
|
|
|
target: 'es2022',
|
2024-04-20 16:42:07 +03:00
|
|
|
}),
|
|
|
|
nodeResolve(),
|
|
|
|
commonjs()
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
input: 'typechain-types/index.ts',
|
|
|
|
output: [
|
|
|
|
{
|
|
|
|
file: 'dist/index.mjs',
|
|
|
|
format: "esm",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
external,
|
|
|
|
plugins: [
|
|
|
|
esbuild({
|
|
|
|
include: /\.[jt]sx?$/,
|
|
|
|
minify: false,
|
|
|
|
sourceMap: true,
|
2024-10-16 10:38:49 +03:00
|
|
|
target: 'es2022',
|
2024-04-20 16:42:07 +03:00
|
|
|
}),
|
|
|
|
nodeResolve()
|
|
|
|
],
|
|
|
|
}
|
|
|
|
]
|
|
|
|
|
|
|
|
export default config;
|