You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.1 KiB
40 lines
1.1 KiB
2 years ago
|
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 path = require("path");
|
||
|
// import { fileURLToPath } from "url";
|
||
|
// import path from "path";
|
||
|
|
||
|
// const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||
|
const input = "src/index.js";
|
||
|
|
||
|
module.exports = [
|
||
|
{
|
||
|
input,
|
||
|
output: [
|
||
|
{
|
||
|
file: "dist/fineui.esm.js",
|
||
|
format: "esm",
|
||
|
sourcemap: true
|
||
|
}
|
||
|
],
|
||
|
plugins: [
|
||
|
alias({
|
||
|
entries: [
|
||
|
{ find: "@", replacement: path.resolve(__dirname, "src") }
|
||
|
]
|
||
|
}),
|
||
|
resolve(),
|
||
|
babel({
|
||
|
babelHelpers: "runtime",
|
||
|
presets: ["@babel/preset-env"],
|
||
|
plugins: [
|
||
|
["@babel/plugin-proposal-decorators", { legacy: true }]
|
||
|
]
|
||
|
}),
|
||
|
commonjs()
|
||
|
]
|
||
|
}
|
||
|
];
|