2020-08-02 19:17:06 +02:00
|
|
|
import babel from '@rollup/plugin-babel'
|
|
|
|
import resolve from '@rollup/plugin-node-resolve'
|
|
|
|
import json from '@rollup/plugin-json'
|
|
|
|
import peerDepsExternal from 'rollup-plugin-peer-deps-external'
|
|
|
|
import { main, name, version, description, author, license } from './package.json'
|
|
|
|
import yaml from 'rollup-plugin-yaml'
|
2019-04-16 19:18:42 +02:00
|
|
|
|
2021-06-13 12:32:28 +02:00
|
|
|
const banner = `/**\n * ${name} | v${version}\n * ${description}\n * (c) ${new Date().getFullYear()} ${author}\n * @license ${license}\n */`
|
|
|
|
|
2019-04-16 19:18:42 +02:00
|
|
|
export default {
|
2020-08-02 19:17:06 +02:00
|
|
|
input: 'src/index.js',
|
2019-04-29 09:01:51 +02:00
|
|
|
output: [
|
|
|
|
{
|
2021-06-13 12:32:28 +02:00
|
|
|
banner,
|
2019-05-18 17:23:05 +02:00
|
|
|
file: main,
|
2020-08-02 19:17:06 +02:00
|
|
|
format: 'cjs',
|
|
|
|
sourcemap: true,
|
|
|
|
exports: 'named'
|
2019-04-29 09:01:51 +02:00
|
|
|
}
|
|
|
|
],
|
2019-04-16 19:18:42 +02:00
|
|
|
plugins: [
|
2020-08-02 19:17:06 +02:00
|
|
|
babel({
|
|
|
|
exclude: 'node_modules/**',
|
|
|
|
babelHelpers: 'bundled'
|
|
|
|
}),
|
2019-04-19 17:31:44 +02:00
|
|
|
peerDepsExternal(),
|
2019-04-20 19:23:22 +02:00
|
|
|
resolve({ modulesOnly: true }),
|
2019-04-16 19:18:42 +02:00
|
|
|
json(),
|
2019-04-20 19:50:37 +02:00
|
|
|
yaml(),
|
2019-04-16 19:18:42 +02:00
|
|
|
]
|
2020-08-02 19:17:06 +02:00
|
|
|
}
|