Eleventy: How to optimize?

Created on 6 Oct 2018  路  4Comments  路  Source: 11ty/eleventy

I see eleventy is great new one generator tool. After a quick test, it looks like it doesn't process CSS/JS files, just keeps the SCRIPT and STYLE tags as they are. If I didn't miss something, here is my few questions:

  • How to minimize JS/CSS files?
  • How to merge them to just 1 .css file at header and 1.js at the end of body tag?
  • How to process CSS files with postcss?

Thank you.

education

Most helpful comment

Hi @ndaidong,

I think the idea is that Eleventy doesn't have an opinion about this other stuff. But I agree it's useful to have - I couldn't work without a build pipeline.

I started with the Eleventy One starter project, which is a starter blog by @philhawksworth .

It includes sass and js compilation / uglification with gulp. I don't know about postcss, but I suspect you could extend EleventyOne to do it.

All 4 comments

Hi @ndaidong,

I think the idea is that Eleventy doesn't have an opinion about this other stuff. But I agree it's useful to have - I couldn't work without a build pipeline.

I started with the Eleventy One starter project, which is a starter blog by @philhawksworth .

It includes sass and js compilation / uglification with gulp. I don't know about postcss, but I suspect you could extend EleventyOne to do it.

Hey @ndaidong did you see our tutorials page? https://www.11ty.io/docs/tutorials/

@edwardhorsford
@zachleat
thank you, I've taken a look at the documentation. It seems we have to write the filters, not already to use.

Ah, okay. I鈥檝e opened #272 to continue that discussion for an officially supported asset pipeline. Let me know if you have other questions!

Was this page helpful?
0 / 5 - 0 ratings