Browse Source
Merge in VISUAL/fineui from ~TREECAT/fineui:es6 to es6 * commit '07aec861b9c95b0b4c4d96a0838f58de1fd3b791': KERNEL-14316 chore: 修复 string 的一些细节 BUG KERNEL-14316 chore: 引入rollup,修复一些细节 BUGes6
treecat-罗群
2 years ago
4 changed files with 54 additions and 11 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