django-manifest-loader icon indicating copy to clipboard operation
django-manifest-loader copied to clipboard

Failing to load entrypoint with DEBUG=True

Open stevecj opened this issue 4 years ago • 4 comments

Running with DEBUG=True, in the browser console, I have the following:

Loading failed for the <script> with source “http://devel-c7-tmp:8000/static/automain.3aae4e640403c1e57326.js”.

In the dist directory, there is a main.3aae4e640403c1e57326.js file. Perhpaps, that URL is exactly what it should be be? It is obviously not resolving to the ./dist/main.3aae4e640403c1e57326.js file as it should though.

In the template, I have <script src="{% manifest 'main.js' %}"></script>.

Any idea what is going on here?

Thanks

stevecj avatar Sep 22 '21 18:09 stevecj

Actually, if I visit the URL manually and remove "auto", I do get the file, so any idea why "auto" is being added to the name in the URL?

stevecj avatar Sep 22 '21 20:09 stevecj

In the manifest.json file, I see that all of the mapped values have "auto" prepended to them.

stevecj avatar Sep 23 '21 01:09 stevecj

I found a question about this and an answer with a workaround at https://stackoverflow.com/questions/65245185/new-to-webpackautoprefix-problem-with-webpack-manifest-plugin

It's a webpack 5 thing.

stevecj avatar Sep 23 '21 01:09 stevecj

I'm not sure whether to close this or to leave it open since a change will be needed to support webpack 5 without the workaround.

stevecj avatar Sep 23 '21 01:09 stevecj