Need advice about which tool to choose?Ask the StackShare community!
Webpack vs Yeoman: What are the differences?
- File Bundling and Code Compilation: Webpack focuses on bundling various assets, such as JavaScript files, CSS files, images, etc., into a more optimized and manageable format, whereas Yeoman is more focused on providing generators to scaffold out new projects and automate repetitive tasks.
- Loaders and Plugins: Webpack makes use of loaders and plugins to process different types of files, apply transformations, and optimize the output bundle, while Yeoman provides a generator ecosystem to scaffold out projects with specific configurations and dependencies.
- Configuration Complexity: Webpack requires a more detailed configuration setup to define the entry point, output path, loaders, plugins, and other settings, making it suitable for complex projects with specific requirements, whereas Yeoman simplifies project initialization by using predefined generators that include common project setups.
- Built-in Development Server: Webpack comes with a built-in development server to serve the bundled assets locally and hot reload changes in real-time, improving the development workflow, whereas Yeoman focuses on project scaffolding and does not provide a development server out of the box.
- Module Bundling: Webpack treats every file in the dependency graph as a module, allowing for code splitting and dynamic imports, while Yeoman's focus is on project setup and generating boilerplate code rather than module bundling.
- Ecosystem Integration: Webpack is commonly used as part of a wider JavaScript ecosystem along with tools like Babel, ESLint, and Node.js, whereas Yeoman serves as a standalone tool for project scaffolding and automation, with less integration with other tools.
In Summary, Webpack and Yeoman differ in their focus on file bundling and code compilation, use of loaders and plugins, configuration complexity, built-in development server, module bundling approach, and ecosystem integration.
I could define the next points why we have to migrate:
- Decrease build time of our application. (It was the main cause).
- Also
jspm install
takes much more time thannpm install
. - Many config files for SystemJS and JSPM. For Webpack you can use just one main config file, and you can use some separate config files for specific builds using inheritance and merge them.
We mostly use rollup to publish package onto NPM. For most all other use cases, we use the Meteor build tool (probably 99% of the time) for publishing packages. If you're using Node on FHIR you probably won't need to know rollup, unless you are somehow working on helping us publish front end user interface components using FHIR. That being said, we have been migrating away from Atmosphere package manager towards NPM. As we continue to migrate away, we may publish other NPM packages using rollup.
Pros of Webpack
- Most powerful bundler309
- Built-in dev server with livereload182
- Can handle all types of assets142
- Easy configuration87
- Laravel-mix22
- Overengineered, Underdeveloped4
- Makes it easy to bundle static assets2
- Webpack-Encore2
- Redundant1
- Better support in Browser Dev-Tools1
Pros of Yeoman
- Lightning-fast scaffolding121
- Automation83
- Great build process78
- Open source57
- Yo49
- Unit Testing8
Sign up to add or upvote prosMake informed product decisions
Cons of Webpack
- Hard to configure15
- No clear direction5
- Spaghetti-Code out of the box2
- SystemJS integration is quite lackluster2
- Loader architecture is quite a mess (unreliable/buggy)2
- Fire and Forget mentality of Core-Developers2
Cons of Yeoman
- Even harder to debug than Javascript1