Skip to content
Moritz Stückler edited this page Mar 30, 2020 · 18 revisions

Using Plugins via preact.config.js

To make customizing your configuration easier, preact-cli supports plugins. Plugins are essentially preact.config.js files that are published to npm as modules that you can install. Here's the process:

  1. Install it: npm install --save-dev preact-cli-foo

  2. Create preact.config.js file in project directory.

  3. Invoke the plugin from your preact.config.js:

    import foo from 'preact-cli-foo';
    export default (config, env, helpers) => {
      config = foo(config, helpers);
      return config;
    };

List of Plugins