fineui是帆软报表和BI产品线所使用的前端框架。
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.
|
|
|
const { resolve } = require("path");
|
|
|
|
const modules = ["./core/platform/web/config"];
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
plugins: [
|
|
|
|
function(babel) {
|
|
|
|
const { types: t } = babel;
|
|
|
|
return {
|
|
|
|
visitor: {
|
|
|
|
Program(path) {
|
|
|
|
if (path.hub.file.opts.filename === resolve(__dirname, "src/index.js")) {
|
|
|
|
for (let i = 0; i < modules.length; i++) {
|
|
|
|
const importStatement = t.importDeclaration([], t.stringLiteral(modules[i]));
|
|
|
|
path.pushContainer("body", importStatement);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
},
|
|
|
|
[
|
|
|
|
"@babel/plugin-proposal-decorators",
|
|
|
|
{
|
|
|
|
legacy: true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
[
|
|
|
|
"module-resolver",
|
|
|
|
{
|
|
|
|
root: ["./src"],
|
|
|
|
alias: {
|
|
|
|
"@": "./src"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
]
|
|
|
|
};
|