Skip to content

Commit 787b6d2

Browse files
docs: improve readme (webpack-contrib#603)
1 parent 315bbac commit 787b6d2

File tree

1 file changed

+49
-7
lines changed

1 file changed

+49
-7
lines changed

README.md

+49-7
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,56 @@ module.exports = {
7373

7474
## Options
7575

76-
### `publicPath`
76+
### Plugin Options
77+
78+
| Name | Type | Default | Description |
79+
| :-----------------------------------: | :------------------: | :-----------------: | :------------------------------------------------------- |
80+
| **[`filename`](#filename)** | `{String\|Function}` | `[name].css` | This option determines the name of each output CSS file |
81+
| **[`chunkFilename`](#chunkFilename)** | `{String\|Function}` | `based on filename` | This option determines the name of non-entry chunk files |
82+
| **[`ignoreOrder`](#ignoreOrder)** | `{Boolean}` | `false` | Remove Order Warnings |
83+
84+
#### `filename`
85+
86+
Type: `String|Function`
87+
Default: `[name].css`
88+
89+
This option determines the name of each output CSS file.
90+
91+
Works like [`output.filename`](https://webpack.js.org/configuration/output/#outputfilename)
92+
93+
#### `chunkFilename`
94+
95+
Type: `String|Function`
96+
Default: `based on filename`
97+
98+
This option determines the name of non-entry chunk files.
99+
100+
Works like [`output.chunkFilename`](https://webpack.js.org/configuration/output/#outputchunkfilename)
101+
102+
#### `ignoreOrder`
103+
104+
Type: `Boolean`
105+
Default: `false`
106+
107+
**[`Remove Order Warnings`](#removeOrderWarnings)**
108+
109+
### Loader Options
110+
111+
| Name | Type | Default | Description |
112+
| :-----------------------------: | :------------------: | :--------------------------------: | :-------------------------------------------------------------------------------- |
113+
| **[`publicPath`](#publicPath)** | `{String\|Function}` | `webpackOptions.output.publicPath` | Specifies a custom public path for the external resources like images, files, etc |
114+
| **[`esModule`](#esModule)** | `{Boolean}` | `true` | Use ES modules syntax |
115+
| **[`modules`](#modules)** | `{Object}` | `undefined` | Configuration CSS Modules |
116+
117+
#### `publicPath`
77118

78119
Type: `String|Function`
79120
Default: the `publicPath` in `webpackOptions.output`
80121

81-
Specifies a custom public path for the target file(s).
122+
Specifies a custom public path for the external resources like images, files, etc inside `CSS`.
123+
Works like [`output.publicPath`](https://webpack.js.org/configuration/output/#outputpublicpath)
82124

83-
#### `String`
125+
##### `String`
84126

85127
**webpack.config.js**
86128

@@ -115,7 +157,7 @@ module.exports = {
115157
};
116158
```
117159

118-
#### `Function`
160+
##### `Function`
119161

120162
**webpack.config.js**
121163

@@ -152,7 +194,7 @@ module.exports = {
152194
};
153195
```
154196

155-
### `esModule`
197+
#### `esModule`
156198

157199
Type: `Boolean`
158200
Default: `true`
@@ -188,14 +230,14 @@ module.exports = {
188230
};
189231
```
190232

191-
### `modules`
233+
#### `modules`
192234

193235
Type: `Object`
194236
Default: `undefined`
195237

196238
Configuration CSS Modules.
197239

198-
#### `namedExport`
240+
##### `namedExport`
199241

200242
Type: `Boolean`
201243
Default: `false`

0 commit comments

Comments
 (0)