Skip to content

Commit f2c9ed5

Browse files
Update docs with description of options.
Cause knowing what things do is good.
1 parent 50abeae commit f2c9ed5

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,21 @@ module.exports = {
4040
},
4141
plugins: [
4242
new ExtractTextPlugin('styles.css'),
43-
new CSSSplitWebpackPlugin({size: 4000, imports: true}),
43+
new CSSSplitWebpackPlugin({size: 4000}),
4444
],
4545
};
46-
4746
```
4847

48+
The following configuration options are available:
49+
50+
**size**: `default: 4000` The maximum number of CSS rules allowed in a single file. To make things work with IE this value should be somewhere around `4000`.
51+
52+
**imports**: `default: false` If you originally built your app to only ever consider using one CSS file then this flag is for you. It creates an additional CSS file that imports all of the split files. You pass `true` to turn this feature on, or a string with the name you'd like the generated file to have.
53+
54+
**filename**: `default: "[name]-[part].[ext]"` Control how the split files have their names generated. The default uses the parent's filename and extension, but adds in the part number.
55+
56+
**preserve**: `default: false`. Keep the original unsplit file as well. Sometimes this is desirable if you want to target a specific browser (IE) with the split files and then serve the unsplit ones to everyone else.
57+
4958
[webpack]: http://webpack.github.io/
5059
[herp]: https://github.com/ONE001/css-file-rules-webpack-separator
5160
[postcss]: https://github.com/postcss/postcss

0 commit comments

Comments
 (0)