lbryinc/rollup.config.js

39 lines
801 B
JavaScript
Raw Normal View History

2019-04-03 23:34:07 +02:00
import babel from 'rollup-plugin-babel';
import flow from 'rollup-plugin-flow';
import includePaths from 'rollup-plugin-includepaths';
import copy from 'rollup-plugin-copy';
import alias from 'rollup-plugin-alias';
2019-04-03 23:34:07 +02:00
let includePathOptions = {
include: {},
paths: ['src'],
external: [],
extensions: ['.js'],
2019-04-03 23:34:07 +02:00
};
export default {
input: 'src/index.js',
output: {
file: 'dist/bundle.es.js',
format: 'cjs',
2019-04-03 23:34:07 +02:00
},
plugins: [
alias({
entries: [
{
find: 'flow-typed',
replacement: './flow-typed',
},
],
}),
2019-04-03 23:34:07 +02:00
flow({ all: true }),
includePaths(includePathOptions),
babel({
babelrc: false,
presets: [],
2019-04-03 23:34:07 +02:00
}),
copy({ targets: [{ src: './flow-typed', dest: 'dist' }] }),
2019-04-03 23:34:07 +02:00
],
external: ['lbry-redux'],
};