1
0
Fork 0
freesewing/packages/core/rollup.config.js

36 lines
886 B
JavaScript
Raw Normal View History

2018-07-23 11:12:06 +00:00
import { terser } from "rollup-plugin-terser";
2018-07-23 14:16:39 +00:00
import babel from "rollup-plugin-babel";
import resolve from "rollup-plugin-node-resolve";
import commonjs from "rollup-plugin-commonjs";
2018-07-23 14:16:39 +00:00
import json from "rollup-plugin-json";
import { name, version, description, author, license } from "./package.json";
2018-07-23 11:12:06 +00:00
export default {
2018-07-23 14:16:39 +00:00
input: "src/index.js",
output: {
sourcemap: true
},
2018-07-23 14:16:39 +00:00
plugins: [
2018-07-23 11:12:06 +00:00
resolve({
browser: true
2018-07-23 14:16:39 +00:00
}),
json(),
commonjs(),
2018-07-23 14:16:39 +00:00
babel({
exclude: "node_modules/**"
2019-02-16 12:25:21 +01:00
}),
babel({
exclude: "node_modules/**",
plugins: [
"@babel/plugin-external-helpers",
"@babel/plugin-proposal-object-rest-spread"
]
}),
2019-02-16 12:25:21 +01:00
terser({
output: {
preamble: `/**\n * ${name} | v${version}\n * ${description}\n * (c) ${new Date().getFullYear()} ${author}\n * @license ${license}\n */`
}
})
2018-07-23 11:12:06 +00:00
]
};