UNPKG

729 BJavaScriptView Raw
1import babel from 'rollup-plugin-babel'
2import json from 'rollup-plugin-json'
3// import pkg from './package.json'
4
5export default {
6 input: 'cli.js',
7 // external: Object.keys(pkg.dependencies).concat('path'),
8 output: {
9 banner: `#!/usr/bin/env node\nrequire('source-map-support').install();`,
10 file: 'bin.js',
11 format: 'cjs',
12 sourcemap: true,
13 },
14 plugins: [
15 json(),
16 babel({
17 babelrc: false,
18 presets: [
19 [
20 '@babel/preset-env',
21 {
22 useBuiltIns: 'usage',
23 // exclude: ['@babel/plugin-transform-regenerator'],
24 targets: {
25 node: '10',
26 },
27 corejs: 3,
28 },
29 ],
30 ],
31 }),
32 ],
33}