You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<strong>Entry:</strong> Indicates which module webpack should use to begin
37
+
<spanclassName="font-bold">Entry:</span> Indicates which module webpack should use to begin
49
38
building out its internal dependency graph.
50
39
</li>
51
40
<li>
52
-
<strong>Output:</strong> Tells webpack where to emit the bundles it
41
+
<spanclassName="font-bold">Output:</span> Tells webpack where to emit the bundles it
53
42
creates and how to name these files.
54
43
</li>
55
44
<li>
56
-
<strong>Loaders:</strong> Allows webpack to process other types of files
45
+
<spanclassName="font-bold">Loaders:</span> Allows webpack to process other types of files
57
46
and convert them into valid modules (e.g., CSS, Images, TypeScript).
58
47
</li>
59
48
<li>
60
-
<strong>Plugins:</strong> Leverages a wide range of tasks like bundle
49
+
<spanclassName="font-bold">Plugins:</span> Leverages a wide range of tasks like bundle
61
50
optimization, asset management, and environment variable injection.
62
51
</li>
63
52
</ul>
64
53
</div>
65
-
66
54
At its core, **webpack** is a _static module bundler_ for modern JavaScript applications. When webpack processes your application, it internally builds a [dependency graph](/concepts/dependency-graph/) from one or more _entry points_ and then combines every module your project needs into one or more _bundles_, which are static assets to serve your content from.
67
55
68
56
T> Learn more about JavaScript modules and webpack modules [here](/concepts/modules).
Webpack's flexibility comes from its <strong>configuration-driven</strong>{""}
42
-
nature. While it works out-of-the-box for simple projects, the configuration
29
+
<pclassName="mb-4">
30
+
Webpack's flexibility comes from its <spanclassName="font-bold">configuration-driven</span> nature. While it works out-of-the-box for simple projects, the configuration
43
31
file allows you to fine-tune how your assets are processed.
<strong>Structure:</strong> Typically defined in a{""}
48
-
<code>webpack.config.js</code> file using CommonJS or ES Modules.
35
+
<spanclassName="font-bold">Structure:</span> Typically defined in a <code>webpack.config.js</code> file using CommonJS or ES Modules.
49
36
</li>
50
37
<li>
51
-
<strong>Environment:</strong> You can export configuration as an object, a
52
-
function, or multiple configurations for different environments (Dev vs.
53
-
Prod).
38
+
<spanclassName="font-bold">Environment:</span> You can export configuration as an object, a function, or multiple configurations for different environments (Dev vs. Prod).
54
39
</li>
55
40
<li>
56
-
<strong>Extensibility:</strong> It acts as the central hub where you
57
-
register your Loaders and Plugins.
41
+
<spanclassName="font-bold">Extensibility:</span> It acts as the central hub where you register your Loaders and Plugins.
<p>Loaders are transformations that are applied to the source code of a module. They allow you to pre-process files as you <code>import</code> or "load" them.</p>
28
-
<ulstyle={{ marginBottom: 0 }}>
29
-
<li><strong>Transformation:</strong> Loaders can convert files from a different language (like TypeScript) to JavaScript.</li>
30
-
<li><strong>Assets:</strong> They allow you to include resources like images or CSS directly in your JavaScript dependency graph.</li>
31
-
<li><strong>Chaining:</strong> You can chain multiple loaders together (e.g., <code>sass-loader</code> -> <code>css-loader</code> -> <code>style-loader</code>).</li>
Loaders are transformations that are applied to the source code of a module. They allow you to pre-process files as you <code>import</code> or "load" them.
<spanclassName="font-bold">Transformation:</span> Loaders can convert files from a different language (like TypeScript) to JavaScript.
26
+
</li>
27
+
<li>
28
+
<spanclassName="font-bold">Assets:</span> They allow you to include resources like images or CSS directly in your JavaScript dependency graph.
29
+
</li>
30
+
<li>
31
+
<spanclassName="font-bold">Chaining:</span> You can chain multiple loaders together (e.g., <code>sass-loader</code> → <code>css-loader</code> → <code>style-loader</code>).
0 commit comments