Home
Recent Q&A
Java
Cloud
JavaScript
Python
SQL
PHP
HTML
C++
Data Science
DBMS
Devops
Hadoop
Machine Learning
Azure
Blockchain
Devops
Ask a Question
Name some benefits of using webpack
Home
GulpJS
Name some benefits of using webpack
0
votes
asked
Jul 13, 2021
in
GulpJS
by
SakshiSharma
Name some benefits of using webpack
webpack-benefits
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Jul 13, 2021
by
SakshiSharma
Webpack and static assets
in a dependency graph offers many benefits. Here's a few:
Dead asset elimination. This is killer, especially for CSS rules. You only build the images and CSS into your dist/ folder that your application actually needs.
Easier code splitting. For example, because you know that your file Homepage.js only requires specific CSS files, Webpack could easily build a homepage.css file to greatly reduce initial file size.
You control how assets are processed. If an image is below a certain size, you could base64 encode it directly into your Javascript for fewer HTTP requests. If a JSON file is too big, you can load it from a URL. You can require('./style.less') and it's automaticaly parsed by Less into vanilla CSS.
Stable production deploys. You can't accidentally deploy code with images missing, or outdated styles.
Webpack will slow you down at the start, but give you great speed benefits when used correctly. You get hot page reloading. True CSS management. CDN cache busting because Webpack automatically changes file names to hashes of the file contents, etc.
Webpack is the main build tool adopted by the React community.
Related questions
0
votes
Q: List some pitfalls of Webpack
asked
Jul 13, 2021
in
GulpJS
by
SakshiSharma
pitfalls-webpack
0
votes
Q: Name some plugins you think are very important and helpful
asked
Jul 13, 2021
in
GulpJS
by
SakshiSharma
webpack-plugins
0
votes
Q: What's the difference between webpack loaders and plugins?
asked
Jul 13, 2021
in
GulpJS
by
SakshiSharma
webpack
plugins
0
votes
Q: Explain me the difference between NPM vs. Bower vs. Browserify vs. Gulp vs. Grunt vs. Webpack?
asked
Jul 13, 2021
in
GulpJS
by
SakshiSharma
npm-vs-bower
bower
0
votes
Q: Webpack gives us a dependency graph. What does that mean?
asked
Jul 13, 2021
in
GulpJS
by
SakshiSharma
webpack-dependency-graph
0
votes
Q: What is webpack?
asked
Jul 13, 2021
in
GulpJS
by
SakshiSharma
webpack
gulpjs-webpack
0
votes
Q: List Benefits Of Using Webpack?
asked
Mar 2, 2020
in
ECMAScript
by
rajeshsharma
#es6-webpack
0
votes
Q: Name some benefits of Python
asked
Jun 16, 2023
in
Python Flask
by
john ganales
python-benefits
0
votes
Q: How do you configure a task in Gulp and what are some common plugins used?
asked
Feb 12, 2023
in
GulpJS
by
sharadyadav1986
gulpjs
gulp-work
task-configuration
0
votes
Q: What are the primary benefits of using Apache Drill over other Big Data querying tools, and what are some common use cases for using it?
asked
Aug 27, 2023
in
Apache Drill
by
john ganales
apachedrillbenefits
...