-
Notifications
You must be signed in to change notification settings - Fork 345
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Not loading image processed by webpack correctly #343
Comments
This is the expected behavior. From docs:
To solve this for your use case, you need to drop the hash on your So change I'll keep this one open and close the other duplicate issues. |
Hey fellow developers any update on the subject ? |
No, feel free to open a PR addressing this or discussing solutions here. |
I'll let you know once I'll figure out something. Thanks for your reactivity btw |
Asset resources in `webpack-stats.json` file will look like, ```json { "assets": { "assets/test-bbf3c94e2a3948c98900.txt": { "name": "assets/test-bbf3c94e2a3948c98900.txt", "path": "/home/user/project-root/assets/test-bbf3c94e2a3948c98900.txt", "publicPath": "http://localhost:3000/assets/test-bbf3c94e2a3948c98900.txt", "sourceFilename": "src/test.txt" } } } ``` Related to django-webpack/django-webpack-loader#343
Asset resources in `webpack-stats.json` file will look like, ```json "assets": { "assets/test-bbf3c94e2a3948c98900.txt": { "name": "assets/test-bbf3c94e2a3948c98900.txt", "path": "/home/user/project-root/assets/test-bbf3c94e2a3948c98900.txt", "publicPath": "http://localhost:3000/assets/test-bbf3c94e2a3948c98900.txt", "sourceFilename": "src/test.txt" } } ``` Related to django-webpack/django-webpack-loader#343
Adding the following template tag ``` {% webpack_asset 'path/to/original/file' %} ``` Fixes django-webpack#343 Depends on django-webpack/webpack-bundle-tracker#125
Hello everyone I suggest the following approach for adressing this issue with Webpack 5:
@fjsj What do you think? |
Thanks for the contribution @batistadasilva ! |
Asset resources in `webpack-stats.json` file will look like, ```json "assets": { "assets/test-bbf3c94e2a3948c98900.txt": { "name": "assets/test-bbf3c94e2a3948c98900.txt", "path": "/home/user/project-root/assets/test-bbf3c94e2a3948c98900.txt", "publicPath": "http://localhost:3000/assets/test-bbf3c94e2a3948c98900.txt", "sourceFilename": "src/test.txt" } } ``` Related to django-webpack/django-webpack-loader#343
Adding the following template tag ``` {% webpack_asset 'path/to/original/file' %} ``` Fixes django-webpack#343 Depends on django-webpack/webpack-bundle-tracker#125
Adding the following template tag ``` {% webpack_asset 'path/to/original/file' %} ``` Fixes django-webpack#343 Depends on django-webpack/webpack-bundle-tracker#125
Adding the following template tag ``` {% webpack_asset 'path/to/original/file' %} ``` Fixes #343 Depends on django-webpack/webpack-bundle-tracker#125
Asset resources in `webpack-stats.json` file will look like, ```json "assets": { "assets/test-bbf3c94e2a3948c98900.txt": { "name": "assets/test-bbf3c94e2a3948c98900.txt", "path": "/home/user/project-root/assets/test-bbf3c94e2a3948c98900.txt", "publicPath": "http://localhost:3000/assets/test-bbf3c94e2a3948c98900.txt", "sourceFilename": "src/test.txt" } } ``` Related to django-webpack/django-webpack-loader#343
Asset resources in `webpack-stats.json` file will look like, ```json "assets": { "assets/test-bbf3c94e2a3948c98900.txt": { "name": "assets/test-bbf3c94e2a3948c98900.txt", "path": "/home/user/project-root/assets/test-bbf3c94e2a3948c98900.txt", "publicPath": "http://localhost:3000/assets/test-bbf3c94e2a3948c98900.txt", "sourceFilename": "src/test.txt" } } ``` Related to django-webpack/django-webpack-loader#343
@fjsj Thanks for the review! |
The configuration load
JS
andCSS
well but image not get filename base on data generated byBundleTracker
.Here is the
webpack.config.js
In
index.js
The template
The result
The
manifest.json
The image
src
should be/dist/images/logo.ea714c6de5100fa65aa6.png
but/dist/images/logo.png
.The text was updated successfully, but these errors were encountered: