Skip to content

Instantly share code, notes, and snippets.

@daybrush
Created October 19, 2018 08:51
Show Gist options
  • Save daybrush/d77092d08698ee0a41ffe992c80c648b to your computer and use it in GitHub Desktop.
Save daybrush/d77092d08698ee0a41ffe992c80c648b to your computer and use it in GitHub Desktop.
multi entry
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", freeze: false, interop: false, sourcemap: true,
},
},
{
input: 'src/index.umd.ts',
plugins: [babel(), uglify()], // or typescript()
output: {
banner,
file: `./dist/item.umd.js`,
format: "umd", freeze: false, interop: false, sourcemap: true,
},
},
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment