2019-04-13 15:20:51 +02:00
|
|
|
import babel from "rollup-plugin-babel";
|
|
|
|
import resolve from "rollup-plugin-node-resolve";
|
|
|
|
import json from "rollup-plugin-json";
|
|
|
|
import minify from "rollup-plugin-babel-minify";
|
2019-04-19 17:31:44 +02:00
|
|
|
import peerDepsExternal from "rollup-plugin-peer-deps-external";
|
2019-04-13 15:20:51 +02:00
|
|
|
import { name, version, description, author, license } from "./package.json";
|
|
|
|
|
|
|
|
export default {
|
|
|
|
input: "src/index.js",
|
|
|
|
output: {
|
|
|
|
sourcemap: true
|
|
|
|
},
|
|
|
|
plugins: [
|
2019-04-19 17:31:44 +02:00
|
|
|
peerDepsExternal(),
|
2019-04-13 15:20:51 +02:00
|
|
|
resolve({ browser: true }),
|
|
|
|
json(),
|
|
|
|
babel({
|
|
|
|
exclude: "node_modules/**",
|
|
|
|
plugins: ["@babel/plugin-proposal-object-rest-spread"]
|
|
|
|
}),
|
|
|
|
minify({
|
|
|
|
comments: false,
|
|
|
|
sourceMap: true,
|
|
|
|
banner: `/**\n * ${name} | v${version}\n * ${description}\n * (c) ${new Date().getFullYear()} ${author}\n * @license ${license}\n */`
|
|
|
|
})
|
|
|
|
]
|
|
|
|
};
|