#36969: collectstatic post-processing with support_js_module_import_aggregation
breaks on certain javascript files
-------------------------------------+------------------------------------
     Reporter:  blighj               |                    Owner:  blighj
         Type:  Bug                  |                   Status:  assigned
    Component:  contrib.staticfiles  |                  Version:  6.0
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+------------------------------------
Changes (by blighj):

 * component:  Documentation => contrib.staticfiles
 * owner:  (none) => blighj
 * status:  new => assigned
 * type:  Cleanup/optimization => Bug

Comment:

 I've done some futher exploring, and two of the three cases, (and a lot of
 the issues I've come across in my own experience), are covered by the
 import in quotes problems. The following regex would fix that, so
 potentially we could use that and not have to update the docs at all. What
 do you thing Jacob?

 I've tested the regex's against the benchmark projects I use and it is
 doing the job. During that testing I did find an issue on the xstate js
 lib, which wasn't directly caused by the change, but in discoverying a fix
 for it you get a fix for 35371 too. So we can move this pretty far along
 with just regexs, way further than I first suspected.

 I've moved the ticket back to bug and assigned myself the owner for now.
 But I'll hold off on a PR until I get your input.


 {{{
 _css_ignored_re = _lazy_re_compile(
     r"/\*.*?\*/"  # block comment
     r"|'(?:[^'\\]|\\.)*'"  # single-quoted string
     r'|"(?:[^"\\]|\\.)*"',  # double-quoted string
     re.DOTALL,
 )
 _js_ignored_re = _lazy_re_compile(
     r"/\*.*?\*/"  # block comment
     r"|//[^\n]*"  # line comment
     r"|'(?:[^'\\]|\\.)*'"  # single-quoted string
     r'|"(?:[^"\\]|\\.)*"'  # double-quoted string
     r"|`(?:[^`\\]|\\.)*`",  # template literal
     re.DOTALL,
 )
 }}}
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36969#comment:13>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/0107019ce9020458-f6cdee71-9c40-42a0-a8c8-92419c80b1c4-000000%40eu-central-1.amazonses.com.

Reply via email to