Skip to content

Instantly share code, notes, and snippets.

@daybrush
Last active October 18, 2018 10:06
Show Gist options
  • Save daybrush/b5ea7e5c42e0437a500fbb0fb1456c0d to your computer and use it in GitHub Desktop.
Save daybrush/b5ea7e5c42e0437a500fbb0fb1456c0d to your computer and use it in GitHub Desktop.
rollup.config.js
import babel from "rollup-plugin-babel";
import typescript from "rollup-plugin-typescript";
import uglify from "rollup-plugin-uglify";
import minify from "rollup-plugin-prototype-minify";
export default {
input: 'src/index.ts',
plugins: [babel()], // or typescript()
output: {
banner,
file: `./dist/item.js`,
format: "es", // "es", "cjs", "umd", "iife" ...
freeze: false, // Object.freeze({})
exports: "named", // "named", "default"
name: "Item", // if format is "umd" or "iife"
interop: false,
sourcemap: true,
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment