|
1 | | -import resolve from "@rollup/plugin-node-resolve"; |
2 | | -import commonjs from "@rollup/plugin-commonjs"; |
3 | | -import typescript from "@rollup/plugin-typescript"; |
| 1 | +import resolve from '@rollup/plugin-node-resolve'; |
| 2 | +import commonjs from '@rollup/plugin-commonjs'; |
| 3 | +import typescript from '@rollup/plugin-typescript'; |
4 | 4 | import postcss from 'rollup-plugin-postcss'; |
5 | | -import { babel } from "@rollup/plugin-babel"; |
| 5 | +import { babel } from '@rollup/plugin-babel'; |
| 6 | +import { terser } from '@rollup/plugin-terser'; |
6 | 7 |
|
7 | 8 | export default { |
8 | | - input: "index.ts", |
9 | | - output: [ |
10 | | - { file: "dist/index.js", format: "cjs", sourcemap: true }, |
11 | | - { file: "dist/index.esm.js", format: "esm", sourcemap: true } |
12 | | - ], |
13 | | - plugins: [ |
14 | | - resolve(), |
15 | | - commonjs(), |
16 | | - typescript({ tsconfig: "./tsconfig.json" }), |
17 | | - babel({ babelHelpers: "bundled" }), |
18 | | - postcss({ |
19 | | - inject: true, |
20 | | - minimize: true, |
21 | | - }), |
22 | | - ], |
23 | | - external: ["react", "react-dom"] |
| 9 | + input: 'index.ts', |
| 10 | + output: [ |
| 11 | + { file: 'dist/index.js', format: 'cjs', sourcemap: true }, |
| 12 | + { file: 'dist/index.esm.js', format: 'esm', sourcemap: true }, |
| 13 | + ], |
| 14 | + plugins: [ |
| 15 | + resolve(), |
| 16 | + commonjs(), |
| 17 | + typescript({ tsconfig: './tsconfig.json' }), |
| 18 | + babel({ babelHelpers: 'bundled' }), |
| 19 | + postcss({ |
| 20 | + inject: true, |
| 21 | + minimize: true, |
| 22 | + }), |
| 23 | + terser(), |
| 24 | + ], |
| 25 | + external: ['react', 'react-dom'], |
24 | 26 | }; |
0 commit comments