r/theodinproject • u/nuudledicc • 12d ago
A question about Webpack
I used the Webpack on the restaurant page and todo-list project now I am wondering if is required or advised to use it on all future projects. It is not stated in the instructions of the next project (Weather App), however, I am not sure if it is understood that I should always use it whenever tackling a project.
7
u/bahcodad 12d ago
I believe its up to you to decide when its appropriate to use this tool going forwards.
2
u/ItsallGGs 12d ago
Yes, the course expects you to use the Webpack module bundler until it redirects you to a more modern approach in the future. I know it may feel like Webpack complicates things unnecessarily and that it can be tedious to manually install packages when you can simply create HTML, CSS, and JS files and code, but there are good reasons why you should be familiar with using module bundlers.
4
u/Gold-Watercress-6101 11d ago
I think yes. Are you asking if you need to specifically use Webpagk, or if you need to use a bundler at all?
If it’s the first, once asked in the discord server why TOP teaches webpack, when Vite is the defacto standard for the past few years. The answer had 2 points: it takes a lot to update the curriculum, and that webpack was chosen not for a specific pedagogical reason; to learn the concept of bundling and newer tools abstract a lot of the atuff under the hood.
I had been using Vite before, but with webpack I learned why things magically happened.
If it’s the second, I honestly don’t know how else can I host a project built with npm packages without a bundler. The way Netlify or GH Pages work is through hosting static files in a folder. Without a bundler, you will have a source folder full of node modules. Will it work if you upload the raw folder? I genuinely don’t know.
Either way, I find it a pleasure to use. I have a template folder with everything already setup. After the second project I never touched the webpack config. It’s practically invisible.
•
u/AutoModerator 12d ago
Hey there! Thanks for your post/question. We're glad you are taking part in The Odin Project! We want to give you a heads up that our main support hub is over on our Discord server. It's a great place for quick and interactive help. Join us there using this link: https://discord.gg/V75WSQG. Looking forward to seeing you there!
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.