|
|
|
const babel = require("@rollup/plugin-babel");
|
|
|
|
const alias = require("@rollup/plugin-alias");
|
|
|
|
const resolve = require("@rollup/plugin-node-resolve");
|
|
|
|
const commonjs = require("@rollup/plugin-commonjs");
|
|
|
|
const sizes = require("rollup-plugin-sizes");
|
|
|
|
const path = require("path");
|
|
|
|
|
|
|
|
module.exports = [
|
|
|
|
{
|
|
|
|
input: path.resolve(__dirname, "src/index.js"),
|
|
|
|
output: [
|
|
|
|
{
|
|
|
|
file: "dist/fineui.esm.js",
|
|
|
|
format: "esm",
|
|
|
|
sourcemap: true,
|
|
|
|
}
|
|
|
|
],
|
|
|
|
plugins: [
|
|
|
|
alias({
|
|
|
|
entries: [
|
|
|
|
{ find: "@", replacement: path.resolve(__dirname, "src") }
|
|
|
|
]
|
|
|
|
}),
|
|
|
|
resolve(),
|
|
|
|
babel({
|
|
|
|
babelHelpers: "inline",
|
|
|
|
plugins: [
|
|
|
|
["@babel/plugin-proposal-decorators", { legacy: true }]
|
|
|
|
]
|
|
|
|
}),
|
|
|
|
commonjs()
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
input: path.resolve(__dirname, "src/bundle.js"),
|
|
|
|
output: [
|
|
|
|
{
|
|
|
|
file: "dist/fineui.min.js",
|
|
|
|
sourcemap: true,
|
|
|
|
format: "umd"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
plugins: [
|
|
|
|
alias({
|
|
|
|
entries: [
|
|
|
|
{ find: "@", replacement: path.resolve(__dirname, "src") }
|
|
|
|
]
|
|
|
|
}),
|
|
|
|
resolve(),
|
|
|
|
babel({
|
|
|
|
babelHelpers: "inline",
|
|
|
|
plugins: [
|
|
|
|
["@babel/plugin-proposal-decorators", { legacy: true }]
|
|
|
|
]
|
|
|
|
}),
|
|
|
|
// babel({
|
|
|
|
// babelHelpers: "runtime",
|
|
|
|
// presets: [babelConfig]
|
|
|
|
// }),
|
|
|
|
commonjs(),
|
|
|
|
sizes(),
|
|
|
|
// terser()
|
|
|
|
]
|
|
|
|
}
|
|
|
|
];
|