#34322: ManifestStaticFilesStorage crashes
-----------------------------------------------+------------------------
               Reporter:  Adam Johnson         |          Owner:  nobody
                   Type:  Bug                  |         Status:  new
              Component:  contrib.staticfiles  |        Version:  4.2
               Severity:  Normal               |       Keywords:
           Triage Stage:  Unreviewed           |      Has patch:  0
    Needs documentation:  0                    |    Needs tests:  0
Patch needs improvement:  0                    |  Easy pickings:  0
                  UI/UX:  0                    |
-----------------------------------------------+------------------------
 #32319 added module support to `ManifestStaticFilesStorage`. It can crash
 with imports in comments, which bundlers like Webpack can leave in.

 Example:

 {{{
 //** @type {import("./htmx").HtmxApi} */
 }}}

 Leads to:

 {{{
 whitenoise.storage.MissingFileError: The file 'example/dist/htmx' could
 not be found with <whitenoise.storage.CompressedManifestStaticFilesStorage
 object at 0x16ff630a0>.

 The JS file 'example/dist/app.js' references a file which could not be
 found:
   example/dist/htmx

 Please check the URL references in this JS file, particularly any
 relative paths which might be pointing to the wrong location.
 }}}

 The regex should be adjusted to only select imports that are alone on a
 line, with whitespace.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34322>
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 on the web visit 
https://groups.google.com/d/msgid/django-updates/01070186320f7e38-ca3472d2-d175-42ce-a414-059fa8ac645e-000000%40eu-central-1.amazonses.com.

Reply via email to