This repository has been archived on 2023-04-04. You can view files and clone it, but cannot push or open issues or pull requests.
2019-12-16 13:27:50 +00:00
|
|
|
import typescript from "rollup-plugin-typescript2";
|
2019-01-25 10:43:13 +00:00
|
|
|
const pkg = require("./package.json");
|
|
|
|
|
2019-12-16 13:27:50 +00:00
|
|
|
const banner = [
|
|
|
|
"/**",
|
|
|
|
" * Copyright (c) 2019, Peculiar Ventures, All rights reserved.",
|
|
|
|
" */",
|
|
|
|
"",
|
|
|
|
].join("\n");
|
|
|
|
const input = "src/index.ts";
|
|
|
|
const external = Object.keys(pkg.dependencies);
|
2019-01-25 10:43:13 +00:00
|
|
|
|
|
|
|
export default {
|
2019-12-16 13:27:50 +00:00
|
|
|
input,
|
|
|
|
plugins: [
|
|
|
|
typescript({
|
|
|
|
check: true,
|
|
|
|
clean: true,
|
|
|
|
tsconfigOverride: {
|
|
|
|
compilerOptions: {
|
|
|
|
module: "ES2015",
|
2019-01-25 10:43:13 +00:00
|
|
|
}
|
2019-12-16 13:27:50 +00:00
|
|
|
}
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
external: ["crypto", ...external],
|
|
|
|
output: [
|
|
|
|
{
|
|
|
|
banner,
|
|
|
|
file: pkg.main,
|
|
|
|
format: "cjs",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
banner,
|
|
|
|
file: pkg.module,
|
|
|
|
format: "es",
|
|
|
|
},
|
|
|
|
],
|
2019-01-25 10:43:13 +00:00
|
|
|
};
|