20 lines
478 B
JavaScript
20 lines
478 B
JavaScript
|
import typescript from "rollup-plugin-typescript";
|
||
|
|
||
|
const pkg = require("./package.json");
|
||
|
|
||
|
const banner = [pkg.banner || "", ""];
|
||
|
|
||
|
export default {
|
||
|
input: "src/index.ts",
|
||
|
plugins: [
|
||
|
typescript({ typescript: require("typescript"), target: "esnext", removeComments: true }),
|
||
|
],
|
||
|
external: Object.keys(pkg.dependencies),
|
||
|
output: [
|
||
|
{
|
||
|
banner: banner.join("\n"),
|
||
|
file: pkg.main,
|
||
|
format: "cjs",
|
||
|
}
|
||
|
]
|
||
|
};
|