initial commit
This commit is contained in:
41
rollup.config.ts
Normal file
41
rollup.config.ts
Normal file
@@ -0,0 +1,41 @@
|
||||
import type { RollupOptions } from 'rollup'
|
||||
import dts from 'rollup-plugin-dts'
|
||||
import { terser } from 'rollup-plugin-terser'
|
||||
import typescript from 'rollup-plugin-typescript2'
|
||||
|
||||
const pkg = require('./package.json')
|
||||
|
||||
const name = 'bdcontract'
|
||||
|
||||
export default [
|
||||
{
|
||||
input: 'src/index.ts',
|
||||
output: [
|
||||
{
|
||||
file: `${pkg.main}`,
|
||||
format: 'umd',
|
||||
name,
|
||||
sourcemap: true,
|
||||
},
|
||||
{ file: `${pkg.module}`, format: 'es', sourcemap: true },
|
||||
{
|
||||
file: `${pkg.iife}`,
|
||||
format: 'iife',
|
||||
name,
|
||||
sourcemap: true,
|
||||
},
|
||||
],
|
||||
plugins: [
|
||||
typescript({
|
||||
tsconfig: 'tsconfig.build.json',
|
||||
useTsconfigDeclarationDir: true,
|
||||
}),
|
||||
terser(),
|
||||
],
|
||||
},
|
||||
{
|
||||
input: 'types/index.d.ts',
|
||||
output: [{ file: 'lib/index.d.ts' }],
|
||||
plugins: [dts()],
|
||||
},
|
||||
] as RollupOptions
|
||||
Reference in New Issue
Block a user