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.
--
Ticket URL: <https://code.djangoproject.com/ticket/32383>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* owner: nobody => Kiran Baby
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/32383#comment:1>
* owner: Kiran Baby => (none)
* status: assigned => new
--
Ticket URL: <https://code.djangoproject.com/ticket/32383#comment:2>
* stage: Unreviewed => Accepted
Comment:
Yep. If we can do this then super 👍
--
Ticket URL: <https://code.djangoproject.com/ticket/32383#comment:3>
* owner: (none) => Adam Johnson
* status: new => assigned
Old description:
New description:
{{{
from whitenoise.storage import CompressedManifestStaticFilesStorage
}}}
--
--
Ticket URL: <https://code.djangoproject.com/ticket/32383#comment:4>
* has_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/32383#comment:5>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/32383#comment:6>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"e32722d1606794f0a85d74811e53a0336a1ce305" e32722d1]:
{{{
#!CommitTicketReference repository=""
revision="e32722d1606794f0a85d74811e53a0336a1ce305"
Fixed #32383 -- Added source map support to ManifestStaticFilesStorage.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/32383#comment:7>