© Mohamed Bouzid 2020
M. BouzidWebpack for Beginnershttps://doi.org/10.1007/978-1-4842-5896-5_5

5. Resolving Folders

Mohamed Bouzid1 
(1)
NA, Morocco
 

After seeing how to prepare our file for caching and exploring the necessary plugins for that purpose, it’s time to tackle a new chapter dedicated to folders: how to replace their path by aliases and how to resolve modules from them. It might seem like I’m saying something strange here, but you will understand what I mean in few minutes.

Organizing Our Files

Before going straight to the main subject, let’s do some organization. So far, all our source code was placed in one folder called “src,” and all our compiled files go to the “build” folder. What we want to do here is organize our files better, and ...

Get Webpack for Beginners: Your Step-by-Step Guide to Learning Webpack 4 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.