1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
const path = require("path");
const buble = require("rollup-plugin-buble");
const uglify = require("rollup-plugin-uglify");
const SRC_DIR = path.resolve("../src");
const DIST_DIR = path.resolve(SRC_DIR, "../dist");
module.exports = {
sourcemap: false,
input: path.join(SRC_DIR, "tuple.js"),
output: {
exports: "named",
file: path.join(DIST_DIR, "tuple.min.js"),
format: "cjs"
},
plugins: [
buble(),
uglify({
mangle: {
toplevel: true,
reserved: ["Tuple", "tuple"]
}
}),
]
};
|