Skip to content

Commit aaa9ece

Browse files
[code-infra] Add context to plugin-transform-react-constant-elements
1 parent 408c103 commit aaa9ece

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

babel.config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ module.exports = function getBabelConfig(api) {
4545
plugins: [...(baseConfig.plugins ?? []), ...plugins],
4646
overrides: [
4747
{
48-
exclude: /\.test\.(m?js|ts|tsx)$/,
48+
// Reduces cold start time of tests. Hoisting the elements is also almost never intended for test files.
49+
// Context https://github.com/mui/material-ui/pull/26448
50+
exclude: /\.test\.(js|tsx)$/,
4951
plugins: ['@babel/plugin-transform-react-constant-elements'],
5052
},
5153
{

0 commit comments

Comments
 (0)