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.
39 lines
1.0 KiB
39 lines
1.0 KiB
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"); |
|
|
|
/** |
|
* todo: 删除根目录下的 babel.config.js,然后移入到这个文件 |
|
*/ |
|
|
|
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: "inline", |
|
plugins: [ |
|
["@babel/plugin-proposal-decorators", { legacy: true }], |
|
], |
|
}), |
|
commonjs(), |
|
], |
|
}, |
|
];
|
|
|