# Version-Specific Notes ## Django 4.x+ (Added [[2024-03-09|March 9, 2024]]) Django 4.x introduced `sourceMappingURL` normalization in built media files. This can impact built files when those paths are relative, since the built file is likely going to be in a different directory from the source files. Normalization rules can be found in `django/contrib/staticfiles/storage.py` in `HashedFilesMixin`: ```python patterns = ( ( "*.css", ( r"""(?P<matched>url\(['"]{0,1}\s*(?P<url>.*?)["']{0,1}\))""", ( r"""(?P<matched>@import\s*["']\s*(?P<url>.*?)["'])""", """@import url("%(url)s")""", ), ( ( r"(?m)(?P<matched>)^(/\*#[ \t]" r"(?-i:sourceMappingURL)=(?P<url>.*)[ \t]*\*/)quot; ), "/*# sourceMappingURL=%(url)s */", ), ), ), ( "*.js", ( ( r"(?m)(?P<matched>)^(//# (?-i:sourceMappingURL)=(?P<url>.*))quot;, "//# sourceMappingURL=%(url)s", ), ), ), ) ``` Here is Django 3.2's: ```python patterns = ( ("*.css", ( r"""(url\(['"]{0,1}\s*(.*?)["']{0,1}\))""", (r"""(@import\s*["']\s*(.*?)["'])""", """@import url("%s")"""), )), ) ``` See [[2024-03-09|March 9, 2024]] for an incident where we discovered this is breaking our CSS.