rykener / django-manifest-loader

Simplifies webpack configuration with Django
https://django-manifest-loader.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
104 stars 12 forks source link

Failing to load entrypoint with DEBUG=True #52

Open stevecj opened 2 years ago

stevecj commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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

stevecj commented 2 years ago

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 commented 2 years ago

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.