ariera / django-vue-template

159 stars 38 forks source link

Uncaught ReferenceError: webpackJsonp is not defined #1

Open DavidLSO opened 6 years ago

DavidLSO commented 6 years ago

During runtime I came across the following problem while running the django runserver, do you know what it can be?

ariera commented 6 years ago

Dear @DavidLSO,

Could you please paste the whole output of the error? It's difficult to guess without context :)

jono-allen commented 6 years ago

I solved it with

   {% if not DEBUG %}
        {% render_bundle 'manifest' 'js' %}
        {% render_bundle 'vendor' 'js' %}
    {% endif %}
    {% render_bundle 'app' %}
LTroya commented 6 years ago

The problem is when you use the npm run build command. It generates 3 bundles: manifest, vendor and app. That bundles have to be imported in that order, if not, it will throw webpackJsonp is not defined.

npm run dev only generates the app bundle