lasso-js / lasso

Advanced JavaScript module bundler, asset pipeline and optimizer
580 stars 75 forks source link

Output transforms process fragments instead of bundles #287

Open Piezoid opened 5 years ago

Piezoid commented 5 years ago

The readme says:

Registered output transforms are used to process bundles as they are written to disk. As an example, an output transform can be used to minify a JavaScript or CSS bundle.

A breakpoint in Transformer.transform(inStream, lassoContext) shows that it not the case: the transformer is called for each CSS fragment separately.

bundlingEnabled is set to true, and a single CSS file is generated on disk.

I would like to perform whole stylesheet optimizations (as with cssnano-preset-advanced). Is it possible within lasso ?