tornado-contracts/rollup.config.mjs

50 lines
922 B
JavaScript
Raw Normal View History

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,
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;