|
1 | 1 | import typescript from 'rollup-plugin-typescript2'; |
2 | 2 | import pkg from './package.json'; |
3 | 3 |
|
4 | | -export default { |
5 | | - input: 'src/index.ts', |
6 | | - output: [ |
7 | | - { file: pkg.main, format: 'cjs' }, |
8 | | - { file: pkg.module, format: 'es' }, |
9 | | - ], |
10 | | - external: [...Object.keys(pkg.dependencies || {}), ...Object.keys(pkg.peerDependencies || {})], |
11 | | - plugins: [ |
12 | | - typescript({ |
13 | | - typescript: require('typescript'), |
14 | | - exclude: ['**/*.test.d.ts'], |
15 | | - }), |
16 | | - ], |
17 | | -}; |
| 4 | +export default [ |
| 5 | + { |
| 6 | + input: 'src/index.ts', |
| 7 | + output: [ |
| 8 | + { file: pkg.main, format: 'cjs' }, |
| 9 | + { file: pkg.module, format: 'es' }, |
| 10 | + ], |
| 11 | + external: [...Object.keys(pkg.dependencies || {}), ...Object.keys(pkg.peerDependencies || {})], |
| 12 | + plugins: [ |
| 13 | + typescript({ |
| 14 | + typescript: require('typescript'), |
| 15 | + exclude: ['**/*.test.d.ts'], |
| 16 | + }), |
| 17 | + ], |
| 18 | + }, |
| 19 | + { |
| 20 | + input: 'src/deprecated/index.ts', |
| 21 | + output: [ |
| 22 | + { file: 'dist/deprecated.js', format: 'cjs' }, |
| 23 | + { file: 'dist/deprecated.es.js', format: 'es' }, |
| 24 | + ], |
| 25 | + external: [...Object.keys(pkg.dependencies || {}), ...Object.keys(pkg.peerDependencies || {})], |
| 26 | + plugins: [ |
| 27 | + typescript({ |
| 28 | + typescript: require('typescript'), |
| 29 | + exclude: ['**/*.test.d.ts'], |
| 30 | + }), |
| 31 | + ], |
| 32 | + }, |
| 33 | +]; |
0 commit comments