﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
32383	ManifestStaticFilesStorage doesn't update JavaScript source map references	Adam Johnson	Adam Johnson	"ManifestStaticFilesStorage replaces URL's in CSS files with the hashed equivalents, but doesn't have any other out-of-the-box rules. One common use case for cross-static-file-references is a [https://developer.mozilla.org/en-US/docs/Tools/Debugger/How_to/Use_a_source_map JavaScript source map], a structured comment in a JS file.

I think it would be a reasonable inclusion that Django modifies these too. I got it working (with Whitenoise's subclass of `ManifestStaticFilesStorage`) with this extra regex pattern:

{{{
from whitenoise.storage import CompressedManifestStaticFilesStorage


class SuperStaticFilesStorage(CompressedManifestStaticFilesStorage):
    patterns = CompressedManifestStaticFilesStorage.patterns + (
        (
            ""*.js"",
            (
                (
                    r""(//# sourceMappingURL=(.*?\.js\.map))$"",
                    ""//# sourceMappingURL=%s"",
                ),
            ),
        ),
    )

}}}

Ideally the regex would start with a `^`, which requires the regex mulitline flag, and would NOT be compiled in case-insenstive mode. The current storage implementation forces compiling regexes with only the case insensitive flag."	New feature	assigned	contrib.staticfiles	dev	Normal				Accepted	0	0	0	0	0	0
