When comparing Fly vs Webpack, the Slant community recommends Webpack for most people. In the question“What are the best Node.js build systems / task runners?” Webpack is ranked 2nd while Fly is ranked 13th. The most important reason people chose Webpack is:
Plugins and loaders are easy to write and allow you to control each step of the build, from loading and compiling CoffeeScript, LESS and JADE files to smart post processing and asset manifest building.
Specs
Ranked in these QuestionsQuestion Ranking
Pros
Pro Takes advantage of ES6 features
Fly is written to use new ES6 features like generators and promises.
Pro Support for concurrent tasks
Fly supports parallel processing and concurrent tasks via Fly.prototype.start([tasks], { parallel: true })
Pro Smaller build files, with same benefits of a huge one
If it's a fly-
plugin you don't have to require it like you do with every other build tool. Theres no need for wrapper functions for each plugin (aka .pipe()
). If it's a fly-
plugin you just call it directly. The build file get's to the point quickly without adding all the extra fluff. This makes your build file very clean and easy to read!
Pro Very easy to setup
Fly is easy to setup, there are no caveats that you have to know since everything is very intuitive. Also with fly you don't have to repeat your self several times. You just define out what you want and that's it. If it's a fly plugin it will be required automatically without the need for an additional plugin.
Pro Fly plugins are required automatically
If you want to use a Fly plugin in a flyfile, it's automatically required
without needing an additional plugin.
Pro Can run subtasks inside a task
Fly supports running multiple subtasks in a single task without having to create a new one.
Pro Rich and flexible plugin infrastructure
Plugins and loaders are easy to write and allow you to control each step of the build, from loading and compiling CoffeeScript, LESS and JADE files to smart post processing and asset manifest building.
Pro Tap into npm's huge module ecosystem
Using Webpack opens you up to npm, that has over 80k modules of which a great amount work both client-side and server-side. And the list is growing rapidly.
Pro Can create a single bundle or multiple chunks loaded on demand, to reduce initial loading time
Webpack allows you to split your codebase into multiple chunks. Chunks are loaded on demand. This reduces the initial loading time.
Pro Supports source maps for easier debugging
Source maps allow for easier debugging, because they allow you to find the problems within the origin files instead of the output file.
Pro ES6 module support
Webpack supports ES6 modules and their import
and export
methods without having to compile them to CommonJS require
Pro Share the same modules client-side and server-side
Because Webpack allows you to use the same require() function as node.js, you can easily share modules between the client-side and server-side.
Pro Bundles CommonJs and AMD modules (even combined)
Webpack supports AMD and CommonJS module styles. It performs clever static analysis on the AST of your code. It even has an evaluation engine to evaluate simple expressions. This allows you to support most existing libraries.
Pro Mix ES6 AMD and CommonJS
Webpack supports using all three module types, even in the same file.
Pro Limit plugin integration issues
Cons
Con Limited number of plugins
There's still a very limited number of Fly plugins. This can contribute negatively in development time and energies spent to make a plugin to complete a task for which there's none yet.
Con Config file may be hard to understand
Due to a somewhat hard to grasp syntax, configuring Webpack may take some time.