UNPKG

997 BJavaScriptView Raw
1import json from 'rollup-plugin-json';
2import resolve from 'rollup-plugin-node-resolve';
3import commonjs from 'rollup-plugin-commonjs';
4import babel from 'rollup-plugin-babel';
5
6const bannerLines = [
7 'This file contains the full Bottleneck library (MIT) compiled to ES5.',
8 'https://github.com/SGrondin/bottleneck',
9 'It also contains the regenerator-runtime (MIT), necessary for Babel-generated ES5 code to execute promise and async/await code.',
10 'See the following link for Copyright and License information:',
11 'https://github.com/facebook/regenerator/blob/master/packages/regenerator-runtime/runtime.js',
12].map(x => ` * ${x}`).join('\n');
13const banner = `/**\n${bannerLines}\n */`;
14
15export default {
16 input: 'lib/es5.js',
17 output: {
18 name: 'Bottleneck',
19 file: 'es5.js',
20 sourcemap: false,
21 globals: {},
22 format: 'umd',
23 banner
24 },
25 external: [],
26 plugins: [
27 json(),
28 resolve(),
29 commonjs(),
30 babel({
31 exclude: 'node_modules/**'
32 })
33 ]
34};