bootstarted / css-split-webpack-plugin

Split your CSS for stupid browsers using webpack and postcss.
78 stars 22 forks source link

Support custom names for chunk and imports file. #2

Closed izaakschroeder closed 8 years ago

izaakschroeder commented 8 years ago

Previously the name of both the split files and the imports file were fixed. For split files they were just the name of the source asset with a -i tacked on; for import files they always overwrote the original asset. Both of these are now customizable using the standard webpack name interpolator; you get things like [name], [ext] and so forth. For the split files you also get an additional [part] value that signifies the current part.

Additionally, this allows for one to generate both the split files and imports as well as keep the original unsplit files. This may be desirable in cases where you only wish to serve the split files to a specific target (i.e. IE) and use the unsplit files everywhere else.

tchon commented 8 years ago

LGTM @izaakschroeder

ananavati commented 8 years ago

👍 LGTM