Webpack Flashcards

1
Q

[webpack] config.module.rules.push() - wat doet dit?

A

This adds a new rule to the webpack module rules array

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

[webpack] test: /.svg$/

A

This rule applies to files with the .svg extension

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

[webpack] include: /node_modules\/assets/

A

include: /node_modules\/assets/ - This restricts the rule to only apply to the rule files within the node_modules/assets directory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

[webpack] use: { loader: ‘url-loader’ }

A

use: { loader: ‘url-loader’ } - It specifies that these SVG files should be processed using the ‘url-loader’

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

[webpack] options: { name: ‘[name].[hash].[ext]’ }

A

Keep the original filename ([name])
Add a content hash for cache busting ([hash])
Keep the original extension ([ext])

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

[webpack] wat doet ‘bundling’?

A

Bundling: It takes various JavaScript files (and their dependencies) and combines them into one or more optimized bundles for the browser.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

[webpack] wat doet Module resolution?

A

Module resolution: Webpack understands different module systems (CommonJS, ES modules) and resolves dependencies between them.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

[webpack] wat doet Loaders?

A

Loaders: It transforms non-JavaScript files (like CSS, images, SVG, TypeScript, etc.) into modules that can be included in your JavaScript bundle through specialized loaders (like the url-loader in your example).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

[webpack] wat doet Code splitting?

A

Code splitting: It can split your code into chunks that load on demand, improving initial load performance.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

[webpack] wat doet Asset optimization?

A

Asset optimization: It can minify, compress, and optimize your code and assets for production.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

[webpack] wat doet Development Tools?

A

Development tools: It provides features like hot module replacement for faster development.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly