by wruza · 4y ago · 0 comments
It may as well be a foreign language to me, but webpack? Webpack is easy... To me.
And yes, it used to be easier. We didn’t have the speed and convenience of deploying code to the web, but we delivered software that worked, and with nicely-written end user documentation.
Every environment of its time goes through a phase of build-specialist position, required for big projects. Webpack must be one of the worst so far though, it's in this uncanny valley of being unopinionated yet still requiring special operators and plugins for everything. It feels like a black box where you just can't be creative and compose things yourself, you always have to copy a template and find the magic justMakeItWork-option. No surprise really, since it's in a rather difficult position, integrating 3 major legacy technologies (css/html/js) that were not meant for it to begin with, add pre-processors like sass, typescript and static asset generation to the mix and you have more than 6 stacks to spaghetti together.
To be fair, while the hours of painful medium articles and gists research, the knowledge gained has given me a better understanding of Webpack, and I do feel more confident when taking on various tutorials which all have different approaches to fit the config to my needs. But still, as a newcomer to JS or someone in OP's position, the build game is certainly a lot more complicated than your command!
....btw, I have no idea what your command does/says :D. Linux (Ubuntu) CLI syntax has been something I've tried to improve on over the years.
This command is a Makefile rule for building .o out of .c source files. It is var-heavy, but results in something like:
gcc -c -std=c99 -Wall -I/path/to/headers -o file.o file.c
I have no idea what my usual webpack config results into and how to debug that mess.