0

I think my problem is more or less a simple question, but I'm not still accustomed to using webpack and so on, So your advice will be helpful to me. (I'm using Django on backend and React on frontend)

Hierarchy of folder

Cebula4
    -  back
         - settings.py
         - manage.py
    -  front
         - static
             - bundles
                  - MainPage.js (webpacked)

Settings.py

...

STATIC_URL = '/static/'
STATICFILES_DIRS=[
    os.path.join(BASE_DIR,'static'),
]

STATIC_ROOT=os.path.join(BASE_DIR,'staticfiles')

...

How can I get this webpack file(MainPage.js) in output folder like C:\Users\1Sun\Cebula4\front\static\bundles\MainPage.js by local web_url like http://127.0.0.1:8000/static/bundles...?

1Sun
  • 2,305
  • 5
  • 14
  • 21
  • `C:\Users\1Sun\Cebula4\front\static\bundles\MainPage.js` is not an URL. Try setting `STATIC_ROOT` to `/static/`. – Red Cricket Dec 08 '18 at 02:43
  • @RedCricket you mean that I need to replace `STATIC_ROOT=os.path.join(BASE_DIR,'staticfiles')` ? – 1Sun Dec 08 '18 at 02:52

0 Answers0