Treecat
2 years ago
4 changed files with 43 additions and 5 deletions
@ -0,0 +1,39 @@
|
||||
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() |
||||
] |
||||
} |
||||
]; |
Loading…
Reference in new issue