forked from fanruan/fineui
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.
65 lines
1.8 KiB
65 lines
1.8 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 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() |
|
] |
|
} |
|
];
|
|
|