Skip to content

Commit c3b9318

Browse files
committed
docs(en): fetch all
1 parent 5495b83 commit c3b9318

File tree

1 file changed

+3
-24
lines changed

1 file changed

+3
-24
lines changed

src/content/loaders/css-loader.mdx

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -89,29 +89,7 @@ console.log(css); // {String}
8989

9090
If there are SourceMaps, they will also be included in the result string.
9191

92-
If, for one reason or another, you need to extract CSS as a
93-
plain string resource (i.e. not wrapped in a JS module) you
94-
might want to check out the [extract-loader](https://github.com/peerigon/extract-loader).
95-
It's useful when you, for instance, need to post process the CSS as a string.
96-
97-
**webpack.config.js**
98-
99-
```js
100-
module.exports = {
101-
module: {
102-
rules: [
103-
{
104-
test: /\.css$/i,
105-
use: [
106-
"handlebars-loader", // handlebars loader expects raw resource string
107-
"extract-loader",
108-
"css-loader",
109-
],
110-
},
111-
],
112-
},
113-
};
114-
```
92+
If, for one reason or another, you need to extract CSS as a file (i.e. do not store CSS in a JS module) you might want to check out the [recommend example](https://github.com/webpack-contrib/css-loader#recommend).
11593

11694
## Options
11795

@@ -752,9 +730,10 @@ For more information on options see:
752730
Supported template strings:
753731

754732
- `[name]` the basename of the resource
733+
- `[folder]` the folder the resource relative to the `compiler.context` option or `modules.localIdentContext` option.
755734
- `[path]` the path of the resource relative to the `compiler.context` option or `modules.localIdentContext` option.
756735
- `[file]` - filename and path.
757-
- `[ext]` - extension with leading .
736+
- `[ext]` - extension with leading `.`.
758737
- `[hash]` - the hash of the string, generated based on `localIdentHashSalt`, `localIdentHashFunction`, `localIdentHashDigest`, `localIdentHashDigestLength`, `localIdentContext`, `resourcePath` and `exportName`
759738
- `[<hashFunction>:hash:<hashDigest>:<hashDigestLength>]` - hash with hash settings.
760739
- `[local]` - original class.

0 commit comments

Comments
 (0)