Skip to content
This repository was archived by the owner on Feb 27, 2024. It is now read-only.

Commit 27825bf

Browse files
committed
chore(rollup): resolve rollup warnings
1 parent 7d7dd26 commit 27825bf

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

rollup.config.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import typescript from 'rollup-plugin-typescript2';
2-
import postcss from 'rollup-plugin-postcss'
3-
import pkg from './package.json'
2+
import postcss from 'rollup-plugin-postcss';
3+
import pkg from './package.json';
44

55
const isProd = process.env.BUILD === 'production';
6-
const getDestination = (dest) => {
6+
const getDestination = dest => {
77
if (isProd) return dest.replace('.js', '.min.js');
88
return dest;
99
};
@@ -15,6 +15,7 @@ export default {
1515
format: 'cjs',
1616
file: getDestination(pkg.main),
1717
name: 'DataScroller',
18+
exports: 'named',
1819
},
1920
{
2021
format: 'es',
@@ -23,9 +24,10 @@ export default {
2324
},
2425
],
2526
plugins: [
26-
typescript({ useTsconfigDeclarationDir: true }),
27+
typescript({useTsconfigDeclarationDir: true}),
2728
postcss({
28-
plugins: []
29-
})
30-
]
31-
}
29+
plugins: [],
30+
}),
31+
],
32+
external: ['react']
33+
};

0 commit comments

Comments
 (0)