5 ms·
I think an interesting reflection when considering the config setup difficulties of Webpack are the so-called 'zero-config' projects like; https://github.com/i
by tombh 9y ago
I think an interesting reflection when considering the config setup difficulties of Webpack are the so-called 'zero-config' projects like;
https://github.com/insin/nwb https://github.com/insin/nwb
https://github.com/saguijs/sagui https://github.com/saguijs/sagui
https://github.com/mozilla-neutrino/neutrino-dev https://github.com/mozilla-neutrino/neutrino-dev
https://github.com/facebookincubator/create-react-app https://github.com/facebookincubator/create-react-app
They help frame this domain's perspective on the timeless tension between usability and flexibility - ie am I prepared to sacrifice some configuration options in return for being able to get quickly setup?
Clearly the answer in a lot of cases is going to be 'no', but nevertheless seeing how difficult it can be to find that sweet spot between usability and flexibility might help one better appreciate the value returned by those difficulties.
Personally, I've found the commitment to stick to the conventions enforced by Create React App to have been largely beneficial (at least so far (in one project)). And I've been surprised how willing and able I am to creatively work within those limitations.
- zumu 9y ago> am I prepared to sacrifice some configuration options in return for being able to get quickly setup? The best part about create-react-app is the `eject` option. So you never have to ask that question. You can just get going with the defaults, then 'eject' your config files to tweak once you uncover your specific needs. I am convinced this 'no lock-in' approach is the way to go for scaffolding builders and frameworks in general.
- allover 9y ago> The best part about create-react-app is the `eject` option Best part or necessary evil? I'm glad it exists, but ultimately you lose a lot of the benefits of create-react-app (seamless updates to react-scripts, e.g. the move from Webpack 1 to 2) as soon as you eject, which is why it is somewhat discouraged, and why some people have built projects that allow you more config overrides without ejecting.
- GeneralMaximus 9y agoWebpack (or any other build tool, really) is complex because people's needs are complex. You don't really need to spend too much time configuring Webpack if you're just trying to bundle a bunch of JS files together. I.e, if you don't need the fancy loaders and plugins and just want an optimized JS bundle, the instructions on this page are all you need: https://webpack.js.org/api/cli/ https://webpack.js.org/api/cli/ (see section titled "Usage Without Config File") But of course, you don't want just that. You want support for ES6, JSX, bundling and optimizing CSS, autoprefixing, bundle splitting, building SVG sprite sheets, etc. etc. At that point you just have to deal with the complexity. > Personally, I've found the commitment to stick to the conventions enforced by Create React App to have been largely beneficial (at least so far (in one project)). And I've been surprised how willing and able I am to creatively work within those limitations. I feel the same way. I no longer configure my build system from scratch. I try to work with create-react-app's defaults for as long as possible, and eject if I can't coax it into doing something I need. It's no different from letting XCode or Visual Studio autogenerate a project for you and customizing it as you go along. At the end of the day, I'd rather write code than configure build systems. But sadly, they're a necessary evil no matter what tech stack you work with. I personally feel that it's not worth spending time learning them deeply, but I'm prepared to pull up that Webpack manual one day because I know I'm definitely going to need it at some point.
- hoppelhase 9y agoI used Brunch for my last project after I gave up configuring Webpack. It just worked and did what I wanted. http://brunch.io http://brunch.io