1
0
Fork 0

construction: Changes to rollup config

This commit is contained in:
joostdecock 2018-07-24 10:15:37 +00:00 committed by Joost De Cock
parent bb7d34cd70
commit 9fffa83c02
3 changed files with 64 additions and 34 deletions

View file

@ -1,22 +1,28 @@
import filesize from 'rollup-plugin-filesize'
import { terser } from "rollup-plugin-terser";
import babel from 'rollup-plugin-babel';
import resolve from 'rollup-plugin-node-resolve';
import filesize from "rollup-plugin-filesize";
import babel from "rollup-plugin-babel";
import resolve from "rollup-plugin-node-resolve";
import json from "rollup-plugin-json";
import meta from "./package.json";
export default {
input: 'src/index.js'
, output: {
file: 'dist/bundle.js'
, format: 'cjs'
}
, plugins: [
input: "src/index.js",
output: {
file: "dist/module.js",
format: "cjs",
banner: `/**\n * ${meta.name} | v${meta.version}\n * ${
meta.description
}\n * (c) ${new Date().getFullYear()} ${meta.author}\n * @license ${
meta.license
}\n */`
},
plugins: [
resolve({
browser: false
})
, babel({
exclude: 'node_modules/**'
})
, terser()
, filesize()
}),
json(),
babel({
exclude: "node_modules/**"
}),
filesize()
]
};