mirror of
https://github.com/zebrajr/react.git
synced 2025-12-06 00:20:04 +01:00
Extracting portions of #32416 for easier review. This PR updates our babel configs (only used in jest) to support classes. Co-authored-by: michael faith <michaelfaith@users.noreply.github.com> --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/32588). * #32592 * #32591 * #32590 * #32589 * __->__ #32588 Co-authored-by: michael faith <michaelfaith@users.noreply.github.com>
18 lines
455 B
JavaScript
18 lines
455 B
JavaScript
/**
|
|
* This file is purely being used for local jest runs, and doesn't participate in the build process.
|
|
*/
|
|
'use strict';
|
|
|
|
module.exports = {
|
|
plugins: [
|
|
'@babel/plugin-syntax-jsx',
|
|
'@babel/plugin-transform-flow-strip-types',
|
|
['@babel/plugin-transform-class-properties', {loose: true}],
|
|
'@babel/plugin-transform-classes',
|
|
],
|
|
presets: [
|
|
['@babel/preset-env', {targets: {node: 'current'}}],
|
|
'@babel/preset-typescript',
|
|
],
|
|
};
|