27 lines
654 B
JavaScript
27 lines
654 B
JavaScript
module.exports = (api) => {
|
|
api.cache(true);
|
|
|
|
const presets = [
|
|
["env", {
|
|
"useBuiltIns": "usage",
|
|
"targets": { "node": "current" },
|
|
}
|
|
]
|
|
];
|
|
|
|
const plugins = [
|
|
["@babel/plugin-proposal-decorators", { "legacy": true }],
|
|
["@babel/plugin-syntax-dynamic-import"],
|
|
["@babel/plugin-transform-class-properties", { "loose": true }],
|
|
["@babel/plugin-transform-private-methods", { "loose": true }],
|
|
["@babel/plugin-transform-private-property-in-object", { "loose": true }],
|
|
["@babel/plugin-transform-modules-commonjs"],
|
|
["@babel/transform-runtime"],
|
|
];
|
|
|
|
return {
|
|
presets,
|
|
plugins,
|
|
};
|
|
}
|