2023-12-28 09:46:16 +00:00
|
|
|
const plugins = [
|
|
|
|
|
[
|
2024-01-04 06:23:04 +00:00
|
|
|
'console-source',
|
2023-12-28 09:46:16 +00:00
|
|
|
{
|
|
|
|
|
segments: 1, // NOT REQUIRED
|
|
|
|
|
// 0 = full file path (Default)
|
|
|
|
|
// 1 = file name ONLY
|
|
|
|
|
// 2 = file name and last segment
|
2024-01-04 06:23:04 +00:00
|
|
|
splitSegment: '/', // How to split the path - NOT REQUIRED
|
2023-12-28 09:46:16 +00:00
|
|
|
// Default is / for Linux and OSX
|
|
|
|
|
// Windows users can use "\\" here if needed
|
|
|
|
|
},
|
2022-02-23 04:18:05 +00:00
|
|
|
],
|
2024-01-04 06:23:04 +00:00
|
|
|
['@babel/transform-runtime'],
|
2023-12-28 09:46:16 +00:00
|
|
|
];
|
|
|
|
|
|
2024-01-04 06:23:04 +00:00
|
|
|
if (process.env.NODE_ENV === 'developement') {
|
|
|
|
|
plugins.push(['istanbul', { include: ['src/**/*.js', 'src/**/*.jsx'] }]);
|
2023-12-28 09:46:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
module.exports = {
|
2026-03-19 07:11:32 +00:00
|
|
|
presets: ['@babel/preset-env', '@babel/preset-react', '@babel/preset-typescript'],
|
2023-12-28 09:46:16 +00:00
|
|
|
plugins,
|
2022-02-23 04:18:05 +00:00
|
|
|
};
|