Permalink
Cannot retrieve contributors at this time
44 lines (41 sloc)
1.06 KB
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
codeql-action/node_modules/bottleneck/rollup.config.light.js
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import commonjs from 'rollup-plugin-commonjs'; | |
import json from 'rollup-plugin-json'; | |
import resolve from 'rollup-plugin-node-resolve'; | |
const bannerLines = [ | |
'This file contains the Bottleneck library (MIT), compiled to ES2017, and without Clustering support.', | |
'https://github.com/SGrondin/bottleneck', | |
].map(x => ` * ${x}`).join('\n'); | |
const banner = `/**\n${bannerLines}\n */`; | |
const missing = `export default () => console.log('You must import the full version of Bottleneck in order to use this feature.');`; | |
const exclude = [ | |
'RedisDatastore.js', | |
'RedisConnection.js', | |
'IORedisConnection.js', | |
'Scripts.js' | |
]; | |
export default { | |
input: 'lib/index.js', | |
output: { | |
name: 'Bottleneck', | |
file: 'light.js', | |
sourcemap: false, | |
globals: {}, | |
format: 'umd', | |
banner | |
}, | |
external: [], | |
plugins: [ | |
json(), | |
{ | |
load: id => { | |
const chunks = id.split('/'); | |
const file = chunks[chunks.length - 1]; | |
if (exclude.indexOf(file) >= 0) { | |
return missing | |
} | |
} | |
}, | |
resolve(), | |
commonjs() | |
] | |
}; |