forked from benitolopez/hotel-datepicker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.mjs
43 lines (40 loc) · 1.23 KB
/
rollup.config.mjs
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import pkg from "./package.json" assert { type: "json" };
import resolve from "@rollup/plugin-node-resolve";
import babel from "@rollup/plugin-babel";
//import { terser } from "rollup-plugin-terser";
import { terser } from "rollup-plugin-minification";
const banner = `/*! ${pkg.name} ${pkg.version} - Copyright 2024 ${pkg.author} - ${pkg.homepage} - ${pkg.license} */`;
export default {
input: "src/js/hotel-datepicker.js",
output: [
{
file: "dist/js/hotel-datepicker.js",
format: "iife",
name: "HotelDatepicker",
banner: banner,
globals: {
["fecha"]: "fecha",
},
},
{
file: "dist/js/hotel-datepicker.min.js",
format: "iife",
name: "HotelDatepicker",
banner: banner,
plugins: [terser()],
globals: {
["fecha"]: "fecha",
},
},
{
file: "dist/js/hotel-datepicker.esm.js",
format: "esm",
banner: banner,
globals: {
["fecha"]: "fecha",
},
},
],
external: ["fecha"],
plugins: [resolve(), babel({ babelHelpers: "bundled" })],
};