django - Webpack chunk load at run time -


i'm writing template django app, inside load .js file built webpack:

<script src="{{ root }}/material/build/app.js" type="text/javascript"></script> 

it found, can access in browser it's under:

http://127.0.0.1:8000/my_app_static/personalization/js/app/material/build/ 

the problem webpack config creates chunk 0.0.js cannot found, understand app.js uses somehow it's not searching in same folder resides, instead searches @ url:

http://127.0.0.1:8000/personalization/material/958cb30c8751ff63160d7b22a69a9ec6/build/0.0.js 

this url defined in urls.py, it's url i'm @ before trying render_to_response("api/js_app_material.html", context_data, c) causes 0.0.js file not found.

my question is: can somehow configure webpack let know search chunks in folder app.js resides? or there else i'm doing wrong?

thanks!

i ran similar , issue me:

if using

 require(['app.jsx'], function (app) {  }); 

try change with

var app = require('app.jsx'); 

Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -