-
-
Notifications
You must be signed in to change notification settings - Fork 187
Expand file tree
/
Copy pathrollup.config.js
More file actions
35 lines (34 loc) · 778 Bytes
/
Copy pathrollup.config.js
File metadata and controls
35 lines (34 loc) · 778 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import typescript2 from 'rollup-plugin-typescript2'
import jsx from 'acorn-jsx'
import { createRequire } from 'module'
const require = createRequire(import.meta.url)
const pkg = require('./package.json')
export default {
input: './src/index.ts',
acornInjectPlugins: [jsx()],
plugins: [
typescript2({
tslib: require('tslib'),
declaration: true,
tsconfig: 'tsconfig.prod.json',
}),
],
external: [
...Object.keys(pkg.dependencies || {}),
...Object.keys(pkg.peerDependencies || {}),
'tslib',
],
output: [
{
file: 'build/index.js',
format: 'cjs',
name: 'react-native-big-calendar',
sourcemap: true,
},
{
file: 'build/index.es.js',
format: 'es',
sourcemap: true,
},
],
}