1
0
Fork 0
docsearch/packages/docsearch-react/babel.config.js
Pierre Millot 93578a4de0
fix: upgrade algoliasearch to v5 (#2326)
We can use the new generated client to stay up to date and upgrade packages that depends on docsearch.

---------

Co-authored-by: shortcuts <vannicattec@gmail.com>
2024-10-30 15:46:38 +01:00

25 lines
479 B
JavaScript

module.exports = (api) => {
const isTest = api.env('test');
const modules = isTest ? 'commonjs' : 'auto';
const targets = {};
if (isTest) {
targets.node = true;
} else {
targets.browsers = ['last 2 versions', 'ie >= 9'];
}
return {
presets: [
'@babel/preset-typescript',
[
'@babel/preset-env',
{
modules,
targets,
},
],
],
plugins: [['@babel/plugin-transform-react-jsx']],
};
};