Hooks for sentry integration (#1460)

* add sentry webpack plugin

* allow override of webpack config

* work around cheerio inability to parse jinga templates

* webpack can not minify jinja templates

* allow script injection to specify other attributes

* allow script injection to specify other attributes

* Adjustments to make plugin systems work

* Add sourcemaps for javascript in prod webpack

* Update .gitignore

* Fix spelling errors

Co-authored-by: Matt Weiden <538456+mweiden@users.noreply.github.com>
This commit is contained in:
Bruce Martin
2020-05-08 15:59:56 -07:00
committed by GitHub
co-authored by Matt Weiden
parent 9026e0ce41
commit c1bf491a96
12 changed files with 100 additions and 38 deletions
+11
View File
@@ -287,6 +287,17 @@ class AppConfig(object):
elif not isinstance(v, str):
raise ConfigurationError(f"CSP directive value must be a string or list of strings.")
# scripts can be string (filename) or dict (attributes). Convert string to dict.
scripts = []
for s in self.server__scripts:
if isinstance(s, str):
scripts.append({"src": s})
elif isinstance(s, dict) and isinstance(s["src"], str):
scripts.append(s)
else:
raise ConfigurationError("Scripts must be string or dict")
self.server__scripts = scripts
def handle_data_locator(self, context):
self.__check_attr("data_locator__s3__region_name", (type(None), bool, str))
if self.data_locator__s3__region_name is True: