As it is now possible to change the configuration via preact.config.js, some useful snippets can be found in several issues: https://github.com/developit/preact-cli/search?q=preact.config.js&type=Issues&utf8=%E2%9C%93
May it be worth to collect (some of) them here in the Github Wiki or in a README? It may be hard to maintain, what do you think about it?
Agreed. I think the quickest thing that can be done is to add a short paragraph in the README to say that WebpackConfigHelpers is very useful for changing the webpack config. Here's a suggestion of what can be added to the README:
Use the
helpersargument to easily modify theconfigobject. For example, you can disable thesourceMapsoption ofUgflifyJsPluginlike this:helpers.getPluginsByName(config, "UglifyJsPlugin")[0].plugin.options.sourceMap = false;
Github already has a Wiki section, what do you think @developit ?
That would be great !! That makes the README clean too !!
Just dropping a note here - I think plugins would make this even better. I'm fine with the wiki, since these are likely too specific and lengthy for the readme itself.
Wiki space for the above:
https://github.com/developit/preact-cli/wiki/Config-Recipes
Filled with recipes
Most helpful comment
Github already has a Wiki section, what do you think @developit ?