webpack-blocks icon indicating copy to clipboard operation
webpack-blocks copied to clipboard

Document that extract-text block can take an options object

Open vlad-zhukov opened this issue 6 years ago • 3 comments

It works right now, but isn't mentioned anywhere.

vlad-zhukov avatar Oct 31 '17 15:10 vlad-zhukov

It cannot... 🤔

There is the documented parameter for the output file and there is one undocumented parameter for passing a fileType string.

The fileType parameter is merely there for backwards-compatibility to early v1.0-alpha versions of webpack-blocks.

Maybe you have been looking at the code of an outdated extract-text block version?

andywer avatar Nov 01 '17 07:11 andywer

The ETP takes 1 argument that is either a filename (as a string) or an options object. Currently the block supports both syntaxes – extractText('file.css') and extractText({filename: 'file.css', allChunks: true}) – (see the source code) but only the first usage is documented.

vlad-zhukov avatar Nov 01 '17 10:11 vlad-zhukov

Ahhh, now I get what you mean :)

andywer avatar Nov 01 '17 12:11 andywer