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';
|
2019-09-16 22:12:43 +02:00
|
|
|
import copy from 'rollup-plugin-copy';
|
|
|
|
import alias from 'rollup-plugin-alias';
|
2019-04-03 23:34:07 +02:00
|
|
|
|
|
|
|
let includePathOptions = {
|
2019-09-16 22:12:43 +02:00
|
|
|
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',
|
2019-09-16 22:12:43 +02:00
|
|
|
format: 'cjs',
|
2019-04-03 23:34:07 +02:00
|
|
|
},
|
|
|
|
plugins: [
|
2019-09-16 22:12:43 +02:00
|
|
|
alias({
|
|
|
|
entries: [
|
|
|
|
{
|
|
|
|
find: 'flow-typed',
|
|
|
|
replacement: './flow-typed',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
}),
|
2019-04-03 23:34:07 +02:00
|
|
|
flow({ all: true }),
|
|
|
|
includePaths(includePathOptions),
|
|
|
|
babel({
|
|
|
|
babelrc: false,
|
2019-09-16 22:12:43 +02:00
|
|
|
presets: [],
|
2019-04-03 23:34:07 +02:00
|
|
|
}),
|
2019-09-16 22:12:43 +02:00
|
|
|
copy({ targets: [{ src: './flow-typed', dest: 'dist' }] }),
|
2019-04-03 23:34:07 +02:00
|
|
|
],
|
2019-09-16 22:12:43 +02:00
|
|
|
external: ['lbry-redux'],
|
|
|
|
};
|