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...?

2
  • C:\Users\1Sun\Cebula4\front\static\bundles\MainPage.js is not an URL. Try setting STATIC_ROOT to /static/. Commented Dec 8, 2018 at 2:43
  • @RedCricket you mean that I need to replace STATIC_ROOT=os.path.join(BASE_DIR,'staticfiles') ? Commented Dec 8, 2018 at 2:52

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.