rollup-plugin-eco

raw JSON →
0.1.1 verified Mon Apr 27 auth: no javascript

A Rollup plugin that compiles Eco templates during bundling. Version 0.1.1 is the latest release; the package appears to be in early development with no recent updates. Eco is a JavaScript template engine similar to CoffeeScript. This plugin provides a simple integration for bundling Eco templates with Rollup. There are few alternative plugins; this one is minimal and directly wraps the eco compiler. No known breaking changes or security issues reported.

error Cannot find module 'eco'
cause Missing dependency; eco is a peer dependency.
fix
Run: npm install eco
error eco is not a function
cause Eco package export shape mismatch; may need specific version.
fix
Install a compatible version: npm install eco@1.0.0
gotcha The plugin has not been updated in several years; ensure compatibility with newer Rollup versions.
fix Test with your Rollup version. Consider forking or using an alternative plugin if issues arise.
gotcha Eco template engine may have performance issues with large templates; not recommended for production.
fix Consider using a more modern template engine like Handlebars or Nunjucks.
npm install rollup-plugin-eco
yarn add rollup-plugin-eco
pnpm add rollup-plugin-eco

Configures Rollup to use the Eco plugin, bundling .eco template files.

// rollup.config.js
import eco from 'rollup-plugin-eco';

export default {
  input: 'src/main.js',
  output: {
    file: 'bundle.js',
    format: 'cjs'
  },
  plugins: [eco()]
};