lasso-js/lasso

How to get bundle output path and file name in custom plugin?

maxmilton opened this issue · 0 comments

I've been working on a plugin for lasso to process CSS via PostCSS (and any arbitarary PostCSS plugins) — https://github.com/WeAreGenki/lasso-postcss. No nice readme yet but I'll work on that soon 💦

The basic functionality is working nicely however I'd like to implement source map generation. I saw over in #122 that source maps arn't even a thing for JS... wow. However, I'd still like to hack something together for my plugin. Source maps are simply too powerful a feature to not use!

Inside the plugin export 'class' we have the read() method, which as its first argument get passed the lassoContext. This has a bunch of nice info but nothing about the output destination.

Is there some way to get the bundle's output path and file name (including the fingerprint etc.)? That's all I need to be able to write the source maps.