|
- import peerDepsExternal from 'rollup-plugin-peer-deps-external'
- import { terser, } from 'rollup-plugin-terser'
- import typescript from '@rollup/plugin-typescript'
-
- import pkg from './package.json'
-
- const ENTRY_POINT = './lib/index.ts'
-
- export default [
- {
- input: ENTRY_POINT,
- output: {
- file: pkg.main,
- format: 'cjs',
- },
- plugins: [
- peerDepsExternal({
- includeDependencies: true,
- }),
- typescript(),
- process.env.NODE_ENV === 'production' && terser(),
- ],
- },
- {
- input: ENTRY_POINT,
- output: {
- file: pkg.module,
- format: 'esm',
- },
- plugins: [
- peerDepsExternal({
- includeDependencies: true,
- }),
- typescript(),
- process.env.NODE_ENV === 'production' && terser(),
- ],
- },
- ]
|