v 0.1.38

Plugins Overview

Ecopages provides two main types of plugins to extend its functionality:

  1. Processors: Handle file transformations and asset processing
  2. Integrations: Add support for new templating engines or frameworks

Types of Plugins

Processors

Processors are plugins that handle file transformations. They can:

Examples include the PostCSS processor and Image processor.

Integrations

Integrations add support for different templating engines and frameworks. They:

Examples include the KitaJS, React, and Lit integrations.

Plugin Configuration

Plugins are configured in your eco.config.ts file:

import { ConfigBuilder } from '@ecopages/core';
import { postcssProcessorPlugin } from '@ecopages/postcss-processor';
import { kitaPlugin } from '@ecopages/kitajs';

const config = await new ConfigBuilder()
  .setProcessors([
    postcssProcessorPlugin(),
  ])
  .setIntegrations([
    kitaPlugin(),
  ])
  .build();

See Custom Processor and Custom Integration for details on creating your own plugins.