Sir you are amazing. Your teaching style is very detailed & easy to understand. I have learned many new things from watching your videos. Thank you very much for sharing your knowledge.
@bugbytes3923 Жыл бұрын
Thanks a lot for that nice comment, I'm glad the videos have helped!
@BenMcNelly2 жыл бұрын
Timely episode, thanks!
@bugbytes39232 жыл бұрын
You’re welcome, hope it is useful!
@robhafemeister31002 жыл бұрын
Great video and perfect timing.
@bugbytes39232 жыл бұрын
Cheers Rob, hope it was useful!
@robhafemeister31002 жыл бұрын
@@bugbytes3923 Very useful, what would be the best way to add tailwind to webpack?
@robhafemeister31002 жыл бұрын
Currently I run npx tailwindcss -i ./src/tailwind.css -o ./assets/styles/styles.css --watch in another tab and then add styles.css to the assets/styles/index.css
@bugbytes39232 жыл бұрын
@@robhafemeister3100 I'm planning a dedicated video on this topic - setting up Tailwind, along with HTMX and Alpine, for a modern "low-JS" application, with Webpack. Should be in a few weeks hopefully!
@robhafemeister31002 жыл бұрын
@@bugbytes3923 That sounds great!
@repotranstech2 жыл бұрын
Very helpful 👍 as always.
@bugbytes39232 жыл бұрын
Thanks!
@jaradc2198 Жыл бұрын
If I were to put the before the closing tag instead of in the , do you recommend to keep it in the head tag or.. doesn't matter? I'm wondering about the use of 'defer' when the script tag is in the head as well?
@Schlumpfpirat2 жыл бұрын
Love it! Can you make a video explaining how django-compressor integrates into all of this?
@codevision84912 жыл бұрын
Great sir😘
@bugbytes39232 жыл бұрын
Cheers!
@ermalgashimramori2 жыл бұрын
Thank you!
@daverobb20112 жыл бұрын
Fantastic as always. I'm getting one Alpine warning in my dev tools that alpine is trying to load before the body is available. It suggests that I add defer to the script tag. Is there a reason why you did not use the defer tag in the script block?
@bugbytes39232 жыл бұрын
Thanks David! That is an oversight on my part. It's best for performance if you defer the script - and Alpine mention it in their installation docs: alpinejs.dev/essentials/installation
@skyhappy2 жыл бұрын
You should check out vite, I use it over webpack since it's faster according to some stats I saw. Built on top of the fastest bundler, esbuild.
@bugbytes39232 жыл бұрын
Thanks for the tip, I'll look into it!
@nicenaija99522 жыл бұрын
Will this work with tailwindcss?
@bugbytes39232 жыл бұрын
There's some specific setup for Tailwind. I'll be demo'ing this in a future short video - the concepts are very similar though.
@tobidegnon44092 жыл бұрын
Have you tried any other js bundler outside of webpack? Something like parcel for exemple. In the js ecosystem webpack is reputed to be the most complex one and since as django devs we would like to avoid the most js complication as possible, I was wondering if something even simpler exists for our use case. But frankly your explanation are quite good and don't make this stuff seam's that complicated
@bugbytes39232 жыл бұрын
I've heard of Parcel and Rollup, but haven't really used them much yet. I'd like to try 'em out though. I think Webpack's still the main one, and it's the one I've used most. Webpack definitely is more complicated than it could be though. Might give the others a go in a future project!
@AmoahDevLabs2 жыл бұрын
Very great tutorial. Any I'm getting an error in my terminal. It seems webpack is traversing through django/contrib/gis/ directory and throwing an error. This is the error "ERROR in /run/media/natus/alpha/Dev/Django/webpack/venv/lib/python3.10/site-packages/django/contrib/gis/templates/gis/admin/osm.js 2:86-87 [tsl] ERROR in /run/media/natus/alpha/Dev/Django/webpack/venv/lib/python3.10/site-packages/django/contrib/gis/templates/gis/admin/osm.js(2,87) TS1109: Expression expected. 377 errors have detailed information that is not shown. Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it." Please check this out.
@bugbytes39232 жыл бұрын
Thank you. Hard to tell exactly, but it looks like a TypeScript error. Are you using the "ts-loader"? When you define the "ts-loader", you should exclude all files from the Django project I think. More on excluding files here: webpack.js.org/guides/typescript/#basic-setup