50 lines
922 B
JavaScript
50 lines
922 B
JavaScript
|
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,
|
||
|
target: 'es2015',
|
||
|
}),
|
||
|
nodeResolve(),
|
||
|
commonjs()
|
||
|
],
|
||
|
},
|
||
|
{
|
||
|
input: 'typechain-types/index.ts',
|
||
|
output: [
|
||
|
{
|
||
|
file: 'dist/index.mjs',
|
||
|
format: "esm",
|
||
|
},
|
||
|
],
|
||
|
external,
|
||
|
plugins: [
|
||
|
esbuild({
|
||
|
include: /\.[jt]sx?$/,
|
||
|
minify: false,
|
||
|
sourceMap: true,
|
||
|
target: 'es2015',
|
||
|
}),
|
||
|
nodeResolve()
|
||
|
],
|
||
|
}
|
||
|
]
|
||
|
|
||
|
export default config;
|