17 lines
405 B
JavaScript
17 lines
405 B
JavaScript
/** @type {import('@babel/core').ConfigFunction} */
|
|
module.exports = api => {
|
|
if (!api.env("test")) {
|
|
return {};
|
|
}
|
|
|
|
return {
|
|
presets: [],
|
|
plugins: [
|
|
["@babel/plugin-transform-typescript", { allowDeclareFields: true }],
|
|
["@babel/plugin-proposal-decorators", { version: "legacy" }],
|
|
"@babel/plugin-transform-modules-commonjs",
|
|
"babel-plugin-macros",
|
|
],
|
|
};
|
|
};
|