title: Support for the experimental syntax 'jsx' isn't currently enabled when using webpack and babel
body: <p>I'm working on creating SSR server for CRA(create-react-app) react project. But, an error has occured when I execute 'npx webpack'.</p>
  <p>This is the picture of my directory tree.
  <a href="https://i.stack.imgur.com/iuGbM.png" rel="noreferrer">My file directory</a></p>
  <p>server.js</p>
  <pre><code>import React from 'react';
  import {renderToString} from &quot;react-dom/server&quot;;
  import express from 'express';
  
  import App from '../src/App.js';
  
  const doc = content =&gt; `
  &lt;!doctype html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;Rendering to strings&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;div id=&quot;app&quot;&gt;${content}&lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;`;
  
  const app = express();
  
  app.get('/', (req,res)=&gt;{
      const props = {
          items: ['One','Two','Three']
      };
      const rendered = renderToString(&lt;App {...props}/&gt;);
      res.send(doc(rendered));
  })
  
  app.listen(8080, ()=&gt;{
      console.log(`listening on localhost:8080`);
  })
  </code></pre>
  <p>webpack.config.js</p>
  <pre><code>const path = require('path');
  
  module.exports = {
      entry: './server.js',
      output: {
          filename: 'app-translated.js',
      },
      module: {
          rules: [
              {
                  test: /\.(js|jsx)$/,
                  use: {
                      loader: &quot;babel-loader&quot;
                  }
              }
          ]
      },
      target: &quot;node&quot;
  }
  </code></pre>
  <p>.babelrc</p>
  <pre><code>{
    &quot;presets&quot;: [
      &quot;@babel/preset-env&quot;,
      &quot;@babel/preset-react&quot;
    ],
    &quot;plugins&quot;: [
      &quot;@babel/plugin-proposal-class-properties&quot;,
      &quot;@babel/plugin-transform-react-jsx&quot;
    ]
  }
  </code></pre>
  <p>Error Message :
  <a href="https://i.stack.imgur.com/tyYYW.png" rel="noreferrer">Error Message picture</a></p>
  <p>I tried many existing solution to this problem(not many) as you see plugin list in .babelrc file but nothing worked.</p>
  <p>But when I moved files in the 'server' directory in line with App.js file in 'src' directory, the error doesn't occured. I want to know the reason why this kind of situation occured.</p>