Day 47: Webpack Woes…

Tried to understand all of the Webpack config file for the create-react-app package. Let me tell you I almost threw up with how overwhelmed I felt. It was extremely frustrating. So I took a deep breath and went back to square one with the webpack docs. I wrote a ton of notes and I was able to understand a little bit of that 700+ line mess of a file. It’s frustrating to be dropped in so deep but at least I have the option of restarting at the shore line. Sometimes you just have to swim to the nearest island regardless of how underprepared you were. Anyways I got LESS and seemingly css-modules setup in my project. I think… I only tested LESS so far. Fingers crossed it all works out. LOL

TLDR;

Okay, so here are the highlights of what I did:

  • JavaScript -> Re-read the getting started docs page and read the webpack Core Concepts article while writing additional notes to cover questions that I had. This took A LOT of time. So many questions. Reading the docs and slowly writing out detailed notes helped me a ton. That 80/20 rule is pretty accurate in my opinion. But getting to that 20% is not always easy. I’d say I’m at about 5% right now. I got a lot more docs to read to get to 20%.
  • Practice -> Got less setup in my latest react project. I probably could have done some copy and paste work from stack overflow but I really wanted to force myself to understand what the hell is going in the config files. I want to be able to write my own in the future so I better get started trying to do what I can now.

LESS loader setup in my webpack.config.js file

Don’t ask me what all this means. I have already forgotten. Today’s work has been a blur! I need it all to sink in first LOL. This Stack Overflow Question did help me though

// j8ahmed -> Adding my Less loader here.
{
  test: lessRegex,
  use: getStyleLoaders(
    {
      importLoaders: 3,
      sourceMap: isEnvProduction
        ? shouldUseSourceMap
        : isEnvDevelopment,
      modules: true,
    },
    'less-loader'
  ),
},


Goal For Round 7 of the #100DaysofCode Challenge

This is my seventh round of the “#100daysofcode” challenge. I will be continuing my work from round five and round six into round seven. I am currently working through the book “Cracking the Coding Interview” by Gayle Laakmann McDowell. My goal is to become more familiar with algorithms and data structures. This goal was derived from my goal to better understand operating systems and key programs that I use in the terminal regularly e.g. Git. This goal was in turn derived from my desire to better understand the fundamental tools used for coding outside of popular GUIs. This in turn was derived from my desire to be a better back-end developer.

I have no idea if my path is correct but I am walking down this road anyways. Worst case scenario I learn a whole bunch of stuff that will help me out on my own personal projects.