|
1 |
| -import typescript from 'rollup-plugin-typescript2'; |
2 |
| -import commonjs from 'rollup-plugin-commonjs'; |
3 |
| -import external from 'rollup-plugin-peer-deps-external'; |
4 |
| -import resolve from 'rollup-plugin-node-resolve'; |
| 1 | +import typescript from "rollup-plugin-typescript2"; |
| 2 | +import commonjs from "rollup-plugin-commonjs"; |
| 3 | +import external from "rollup-plugin-peer-deps-external"; |
| 4 | +import resolve from "rollup-plugin-node-resolve"; |
5 | 5 |
|
6 |
| -import pkg from './package.json'; |
| 6 | +import pkg from "./package.json"; |
7 | 7 |
|
8 | 8 | export default {
|
9 |
| - input: 'src/index.tsx', |
10 |
| - output: [ |
11 |
| - { |
12 |
| - file: pkg.main, |
13 |
| - format: 'cjs', |
14 |
| - exports: 'named', |
15 |
| - sourcemap: true, |
16 |
| - }, |
17 |
| - { |
18 |
| - file: pkg.module, |
19 |
| - format: 'es', |
20 |
| - exports: 'named', |
21 |
| - sourcemap: true, |
22 |
| - }, |
23 |
| - ], |
24 |
| - plugins: [ |
25 |
| - external(), |
26 |
| - resolve(), |
27 |
| - typescript({ |
28 |
| - rollupCommonJSResolveHack: true, |
29 |
| - exclude: '**/__tests__/**', |
30 |
| - clean: true, |
31 |
| - }), |
32 |
| - commonjs({ |
33 |
| - include: ['node_modules/**'], |
34 |
| - namedExports: { |
35 |
| - 'node_modules/react/react.js': [ |
36 |
| - 'Children', |
37 |
| - 'Component', |
38 |
| - 'PropTypes', |
39 |
| - 'createElement', |
40 |
| - ], |
41 |
| - 'node_modules/react-dom/index.js': ['render'], |
42 |
| - }, |
43 |
| - }), |
44 |
| - ], |
| 9 | + input: "src/index.tsx", |
| 10 | + output: [ |
| 11 | + { |
| 12 | + file: pkg.main, |
| 13 | + format: "cjs", |
| 14 | + exports: "named", |
| 15 | + sourcemap: true, |
| 16 | + }, |
| 17 | + { |
| 18 | + file: pkg.module, |
| 19 | + format: "es", |
| 20 | + exports: "named", |
| 21 | + sourcemap: true, |
| 22 | + }, |
| 23 | + ], |
| 24 | + plugins: [ |
| 25 | + external(), |
| 26 | + resolve(), |
| 27 | + typescript({ |
| 28 | + rollupCommonJSResolveHack: true, |
| 29 | + exclude: ["**/__tests__/**"], |
| 30 | + clean: true, |
| 31 | + }), |
| 32 | + commonjs({ |
| 33 | + include: ["node_modules/**"], |
| 34 | + namedExports: { |
| 35 | + "node_modules/react/react.js": [ |
| 36 | + "Children", |
| 37 | + "Component", |
| 38 | + "PropTypes", |
| 39 | + "createElement", |
| 40 | + ], |
| 41 | + "node_modules/react-dom/index.js": ["render"], |
| 42 | + }, |
| 43 | + }), |
| 44 | + ], |
45 | 45 | };
|
0 commit comments