Skip to content

Instantly share code, notes, and snippets.

@dennisschneider
Last active May 22, 2020 14:18
Show Gist options
  • Save dennisschneider/bb0f270a9fa5dccc683a497a939dc21a to your computer and use it in GitHub Desktop.
Save dennisschneider/bb0f270a9fa5dccc683a497a939dc21a to your computer and use it in GitHub Desktop.
import commonjs from "@rollup/plugin-commonjs";
import resolve from "@rollup/plugin-node-resolve";
import peerDepsExternal from "rollup-plugin-peer-deps-external";
import typescript from "rollup-plugin-typescript2";
import packageJson from "./package.json";
export default {
input: "./src/index.ts",
output: [
{
file: packageJson.main,
format: "cjs",
sourcemap: true
},
{
file: packageJson.module,
format: "esm",
sourcemap: true
}
],
plugins: [peerDepsExternal(), resolve(), commonjs(), typescript()]
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment