bruno/packages/bruno-graphql-docs/rollup.config.js

46 lines
1.1 KiB
JavaScript
Raw Permalink Normal View History

const { nodeResolve } = require("@rollup/plugin-node-resolve");
const commonjs = require("@rollup/plugin-commonjs");
const typescript = require("@rollup/plugin-typescript");
const dts = require("rollup-plugin-dts");
const postcss = require("rollup-plugin-postcss");
const { terser } = require("rollup-plugin-terser");
const peerDepsExternal = require('rollup-plugin-peer-deps-external');
2022-11-04 19:12:34 +01:00
const packageJson = require("./package.json");
module.exports = [
2022-11-04 19:12:34 +01:00
{
input: "src/index.ts",
output: [
{
file: packageJson.main,
format: "cjs",
sourcemap: true,
},
{
file: packageJson.module,
format: "esm",
sourcemap: true,
},
],
plugins: [
postcss({
minimize: true,
extensions: ['.css']
}),
2022-11-04 19:12:34 +01:00
peerDepsExternal(),
nodeResolve({
extensions: ['.css']
}),
2022-11-04 19:12:34 +01:00
commonjs(),
typescript({ tsconfig: "./tsconfig.json" }),
terser()
2022-11-04 19:12:34 +01:00
],
external: ["react", "react-dom", "index.css"]
},
{
input: "dist/esm/index.d.ts",
output: [{ file: "dist/index.d.ts", format: "esm" }],
plugins: [dts.default()],
2022-11-04 19:12:34 +01:00
}
];