mirror of
https://github.com/zhigang1992/react-slot-fill.git
synced 2026-01-12 17:43:10 +08:00
21 lines
406 B
JavaScript
21 lines
406 B
JavaScript
import fs from 'fs';
|
|
import typescript from 'rollup-plugin-typescript2';
|
|
|
|
const pkg = JSON.parse(fs.readFileSync('./package.json'));
|
|
|
|
export default {
|
|
input: 'src/lib/index.ts',
|
|
plugins: [
|
|
typescript({
|
|
typescript: require('typescript')
|
|
})
|
|
],
|
|
|
|
output: [
|
|
{ file: pkg.main, format: 'cjs' },
|
|
{ file: pkg.module, format: 'es' }
|
|
],
|
|
|
|
external: ['react', 'prop-types', 'mitt']
|
|
};
|