Minification and concatenation of CSS and Javascript (with Plack?)

Mark Stringer mark at
Mon Nov 25 16:54:41 GMT 2013

Plack::App::MCCS doesn't concatenate the files unfortunately. We do that 
during our build process, by combining the minified files it has 
produced, and use config to determine whether to call the concatenated 
files (production) or not (development - in order to aid debugging).

On 11/24/2013 12:49 AM, Pierre M wrote:
> Ok, now I've tried
> Plack::Middleware::Assets<>with
> the right list of files but nothing seems to happen:
>   - the chrome dev tools don't indicate that the files have been minified or
> concatenated (which might be normal as it's happening server-side?)
>   - the page loading time doesn't improve; while when i concatenated the
> files manually, the loading time decreased significantly.
> I've also tried Plack::App::MCCS
> <>by doing
>      my $app = builder {
>          # Loading some Plack::Middlewares...
>          MyApp->dance;
>      }
>      builder {
>          mount '/public' => Plack::App::MCCS->new(root => '/public');
>          mount '/' => $app;
>      }
> which gives a similar result.
> I probably did something wrong (but not wrong enough that the app doesn't
> run). I might end up putting some print statements inside these modules, to
> see what's going on. Sleepy time now. I'll investigate further on Monday.
> ---
> I check email a couple times daily; to reach me sooner, you can send me a
> text message via this page:
> On 23 November 2013 23:47, Pierre M <piemas25 at> wrote:
>>> does the exemple in the docs, or t/basic.t in the distribution not point
>> you in the right direction?  Is there something missing from the docs that
>> is causing you pain?
>> Haha! I'm remembering now what I thought last week: my files are not all
>> in the same folder, so I have to list them all first. I had tried
>> <**/*.css> and the wildcard didn't work; I left that in the code last week,
>> and this week assumed it did work. Sorry for a question whose answer I had.
>> Plack::App::MCCS <> seems good.
>> How to you use it with a Dancer2 app? (what is $app in the case of a
>> Dancer2 app?)

More information about the mailing list