diff --git a/react/bundle.py b/react/bundle.py index 05becf7..fc012ac 100644 --- a/react/bundle.py +++ b/react/bundle.py @@ -88,6 +88,9 @@ def generate_config_for_component(path, translate=None, devtool=None): } }) + if settings.WEBPACK_CONFIG: + config.update(settings.WEBPACK_CONFIG) + if devtool: config['devtool'] = devtool diff --git a/react/conf.py b/react/conf.py index 016e484..b6a6f0c 100644 --- a/react/conf.py +++ b/react/conf.py @@ -11,4 +11,7 @@ class Conf(conf.Conf): JS_HOST_FUNCTION = 'react' + # webpack config, will be inserted to webpack config + WEBPACK_CONFIG = {} + settings = Conf() \ No newline at end of file