How can I designate 'url' of 'BUNDLE_DIR_NAME' correctly?

178 Views Asked by At

I'm using Django and react with webpack

While setting up WEBPACK_LOADER in settings.py, I've faced the problem! My file tree is like this.

My File Tree

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

and

WEBPACK_LOADER = {
    'DEFAULT' : {
            'BUNDLE_DIR_NAME': '/front/bundles/',
            'STATS_FILE': os.path.join(BASE_DIR, 'front/webpack-stats.json'),

    }
}

I'd like to get a bundled(webpacked) file, MainPage.js but, Server said there is none at that url.enter image description here

Please understand my low level of programming,
Could I ask what is the correct url that I can get exact MainPage.js?

Added part of my STATIC_URL and STATIC_ROOT

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

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

There are 0 best solutions below