Skip to content

Commit 4538c6e

Browse files
changes according to suggestion for issue #3846 (#3913)
1 parent 64a5b43 commit 4538c6e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/content/guides/asset-management.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ __webpack.config.js__
8787
};
8888
```
8989

90+
Module loaders can be chained. Each loader in the chain applies transformations to the processed resource. A chain is executed in reverse order. The first loader passes its result (resource with applied transformations) to the next one, and so forth. Finally, webpack expects JavaScript to be returned by the last loader in the chain.
91+
92+
The above order of loaders should be maintained: 'style-loader' comes first and followed by 'css-loader'. If this convention is not followed, webpack is likely to throw errors.
93+
9094
T> webpack uses a regular expression to determine which files it should look for and serve to a specific loader. In this case, any file that ends with `.css` will be served to the `style-loader` and the `css-loader`.
9195

9296
This enables you to `import './style.css'` into the file that depends on that styling. Now, when that module is run, a `<style>` tag with the stringified css will be inserted into the `<head>` of your html file.

0 commit comments

Comments
 (0)