Skip to content

Commit

Permalink
use jest directly instead of dts-cli (#3771)
Browse files Browse the repository at this point in the history
* use jest directly instead of dts-cli

* fix jest environment setup
  • Loading branch information
zxbodya authored Jul 24, 2023
1 parent bef8325 commit 97f8d07
Show file tree
Hide file tree
Showing 48 changed files with 20,394 additions and 3,320 deletions.
16 changes: 2 additions & 14 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,13 @@
const BABEL_ENV = process.env.BABEL_ENV;
const IS_TEST = BABEL_ENV === 'test';
const ignore = IS_TEST ? [] : ['test/**/*.js'];
const targets = IS_TEST ? { node: 'current' } : {};

module.exports = {
presets: [
[
'@babel/preset-env',
{
modules: ['cjs', 'test'].includes(BABEL_ENV) ? 'commonjs' : false,
targets,
},
],
['@babel/preset-env', { targets: { node: 'current' } }],
[
'@babel/preset-react',
{
runtime: 'automatic',
},
],
'@babel/preset-typescript',
],
plugins: ['@babel/plugin-proposal-class-properties', '@babel/plugin-proposal-optional-chaining'],
ignore,
sourceMaps: 'inline',
};
Loading

0 comments on commit 97f8d07

Please sign in to comment.