forked from sanity-io/sanity-plugin-scheduled-publishing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config.js
35 lines (34 loc) · 908 Bytes
/
rollup.config.js
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 {babel} from '@rollup/plugin-babel'
import json from '@rollup/plugin-json'
import nodeResolve from '@rollup/plugin-node-resolve'
import typescript from '@rollup/plugin-typescript'
import peerDepsExternal from 'rollup-plugin-peer-deps-external'
export default {
// supress warnings with sanity parts + config
external: (id) => Boolean(id.startsWith('config:') || id.startsWith('part:')),
input: [
'src/documentActions.ts', //
'src/documentBadges.ts',
'src/inputResolver.ts',
'src/index.ts',
'src/tool.ts',
],
output: [
{
dir: 'lib',
exports: 'auto',
format: 'cjs',
},
],
plugins: [
peerDepsExternal(),
nodeResolve({resolveOnly: ['@vvo/tzdb']}),
json(), // needed by @vvo/tzdb
babel({
babelHelpers: 'bundled',
include: ['node_modules/@vvo/tzdb/**'],
presets: ['@babel/env'],
}),
typescript(),
],
}