-
-
Notifications
You must be signed in to change notification settings - Fork 375
Plugins
Jason Miller edited this page Jul 11, 2017
·
18 revisions
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:
-
Install it:
npm install --save-dev preact-cli-foo
-
Invoke it from your
preact.config.js
:import foo from 'preact-cli-foo'; export default (config, helpers) => { config = foo(config, helpers); return config; };
-
preact-cli-lodash: Optimize builds using
babel-plugin-lodash
&lodash-webpack-plugin
. -
preact-cli-postcss: Replaces default PostCSS config with your
postcss.config.js