title: django-webpack-loader not rendering react app using react-app-rewired
body: <p>I'm working on tying my react(16.6.3) and Django(2.0) apps together. Right now I'm just working to get the dev server working and will focus on production later. I've been following a handful of guides on this process, but they're all a little different (and most seem outdated) and I haven't been able to find the right combination to get this working. My ultimate goal is that I'd like to be able to run the dev servers from 1 terminal window.</p>
  
  <p>I'm using react-app-rewired because I'd like to not have to eject. My understanding is that it's more desirable to not eject rather than have to manually configure all of the Webpack configs. This may especially be true for me as I'm still learning react/webpack.</p>
  
  <p>Its my understanding that once this is configured I just need to run the Django server and it should display my app. I'm not running <code>collectstatic</code> or any <code>npm start</code> or build commands.</p>
  
  <p>Here's what I have configured:</p>
  
  <p>base.py</p>
  
  <pre><code>...    
  STATICFILES_DIRS = [
          # os.path.join(os.path.join(BASE_DIR, 'frontend'), 'build', 'static')
          os.path.join(BASE_DIR, "frontend", "build", "static"),
      ]
  ...
  </code></pre>
  
  <p>local.py</p>
  
  <pre><code>...
  WEBPACK_LOADER = {
      "DEFAULT": {
          "CACHE": not DEBUG,
          "BUNDLE_DIR_NAME": "frontend/build/static/",  # must end with slash
          "STATS_FILE": os.path.join(BASE_DIR, "frontend", "build", "webpack-stats.json"),
      }
  }
  ...
  </code></pre>
  
  <p>config-overrides.js</p>
  
  <pre><code>var BundleTracker = require('webpack-bundle-tracker');
  
  module.exports = {
    webpack: (config, env) =&gt; {
  
      config.plugins.push(
        new BundleTracker({
          path: __dirname,
          filename: './build/webpack-stats.json'
        }),
      );
  
      return config;
    },
  };
  </code></pre>
  
  <p>main.html</p>
  
  <pre><code>{ % load render_bundle from webpack_loader % }
  
  &lt;!DOCTYPE html&gt;
  &lt;html&gt;
    &lt;head&gt;
      &lt;meta charset="UTF-8" /&gt;
      &lt;meta name="viewport" content="width=device-width" /&gt;
      &lt;title&gt;Django + React CRUD&lt;/title&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;div id="root"&gt;
       This is where React will be mounted
      &lt;/div&gt;
      { % render_bundle 'main' % }
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>urls.py</p>
  
  <pre><code>from django.contrib import admin
  from django.urls import path, include
  from django.views.generic import TemplateView
  
  urlpatterns = [
      path('admin/', admin.site.urls),
      path(r'', include('api.urls')),
      path(r'', TemplateView.as_view(template_name="main.html"))
  ]
  </code></pre>
  
  <p>With this configuration, and the Django server running, when I navigate to localhost:8000 all I see is a basic page:</p>
  
  <p><a href="https://i.stack.imgur.com/R4jwq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/R4jwq.png" alt="enter image description here"></a></p>
  
  <p>Project Structure:</p>
  
  <pre><code>.
  ├── api
  │   ├── __init__.py
  │   ├── __pycache__
  │   ├── admin.py
  │   ├── apps.py
  │   ├── migrations
  │   ├── models.py
  │   ├── serializers.py
  │   ├── tests.py
  │   ├── urls.py
  │   └── views.py
  ├── financeApp
  │   ├── __init__.py
  │   ├── __pycache__
  │   └── templates
  ├── build
  │   └── webpack-stats.json
  ├── config
  │   ├── __init__.py
  │   ├── __pycache__
  │   ├── settings
  │   ├── urls.py
  │   └── wsgi.py
  ├── database20181022.json
  ├── db.sqlite3
  ├── docker-compose-dev.yml
  ├── docker-compose.yml
  ├── docker_compose
  │   ├── django
  │   ├── nginx
  │   ├── node
  │   └── postgres
  ├── frontend
  │   ├── README.md
  │   ├── build
  │   ├── config-overrides.js
  │   ├── node_modules
  │   ├── package-lock.json
  │   ├── package.json
  │   ├── package0.json
  │   ├── public
  │   └── src
  ├── manage.py
  ├── requirements
  │   ├── base.txt
  │   ├── local.txt
  │   └── production.txt
  ├── static
  │   ├── builds
  │   ├── builds-development
  │   └── js
  ├── templates
      └── main.html
  </code></pre>