4 ms·
I currently use gulp and, over the yars, have found many ways to do my own parsing and smart caching and stuff over, like checking and bumping version numbers,
by neals 10y ago
I currently use gulp and, over the yars, have found many ways to do my own parsing and smart caching and stuff over, like checking and bumping version numbers, conditional compiling, caching assets etc.
I'd hate to loose all that, but I do see the advantages of Webpack. How much control do I have with Webpack though? Can I still write my own hooks?
- intruder 10y agoYes you can hook any kind of plugin up. Can be a simple object that has an 'apply' method exposed that gets passed the compiler.
- noir_lord 10y agoThat's my concern as well, I use browserify and a simple bash script to do some clever stuff I couldn't reliably do with Grunt, I'd hate to lose the flexibility.
- intruder 10y agoYou won't lose any flexibility. See link above regarding plugins.
- the_duke 10y agoAll of Webpack's core functionality is provided by plugins. By writing your own, you can hook into pretty much everything you could possibly want. https://webpack.js.org/concepts/plugins/ https://webpack.js.org/concepts/plugins/
- shados 10y agoThe vast majority of anything you'll ever need, even in absurdly complex scenarios, are built in. If you need to do something really wild and weird, the plugin and loader architecture will let you do pretty much anything and hook into nearly everything. We're dealing with a legacy environment here and we have a suite of plugins and loaders to handle non-standard module types, deal with files pulled from CDN at build time, deal with legacy Rails-style script imports, plugins to do all sort of bundle validation, splitting, transforming...really anything goes.
- vladimir-y 10y agoThe thing is Webpack does all generally needed web building stuff out of the box and there are plugins and addition loaders. You can define needed behavior in a kind of way having no need dealing with Gulp mess. I used Gulp before, then switched to the Webpack and have already switched a few projects to the Webpack v2. Webpack is a gulp of fresh air, much convenient than Gulp or similar stuff using which you will have to write your own framework.
- Sacho 10y agoWhy not use them together? Bundle your assets with gulp and bundle your code with webpack. You've already had to solve the problem of linking from code -> assets, which is what webpack solves by bundling both.