We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c751946 commit ea9ab70Copy full SHA for ea9ab70
1 file changed
rollup.config.js
@@ -0,0 +1,34 @@
1
+import typescript from 'rollup-plugin-typescript2';
2
+import { createRequire } from 'module';
3
+
4
+const require = createRequire(import.meta.url);
5
+const pkg = require('./package.json');
6
7
+export default {
8
+ input: 'src/index.ts',
9
+ output: [
10
+ {
11
+ file: pkg.main,
12
+ format: 'cjs',
13
+ exports: 'named',
14
+ sourcemap: true,
15
+ },
16
17
+ file: pkg.module,
18
+ format: 'esm',
19
20
21
22
+ ],
23
+ external: [
24
+ ...Object.keys(pkg.peerDependencies || {}),
25
+ 'react',
26
+ 'react-dom',
27
28
+ plugins: [
29
+ typescript({
30
+ typescript: require('typescript'),
31
+ clean: true,
32
+ }),
33
34
+};
0 commit comments