From 6e84dab046c353b838a26662272e09da839c27d6 Mon Sep 17 00:00:00 2001 From: Bhawna Patnaik <44670836+mitchell-frost@users.noreply.github.com> Date: Thu, 13 Aug 2020 20:44:28 +0530 Subject: [PATCH 1/2] changes according to suggestin --- src/content/guides/asset-management.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/content/guides/asset-management.md b/src/content/guides/asset-management.md index 86838d3b564d..40e798be12b9 100644 --- a/src/content/guides/asset-management.md +++ b/src/content/guides/asset-management.md @@ -87,6 +87,10 @@ __webpack.config.js__ }; ``` +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. + +The above order or loaders should be maintained with 'style-loader' coming first and then, 'css-loader'. If this convention is not followed, webpack is likely to throw errors. + 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`. This enables you to `import './style.css'` into the file that depends on that styling. Now, when that module is run, a `