Skip to content

Commit

Permalink
add links to survey for modifyWebpackConfig use (#433)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredmcdonald authored and ccpricenytimes committed Mar 10, 2017
1 parent 968af13 commit 715c857
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ Developers design their own architecture, choosing the tools they need for rende
For advanced use cases, kyt enables developers to add additional tools and configuration.
See our [config override instructions](/docs/kytConfig.md#modifywebpackconfig) for details, and our [recipes](/docs/Recipes.md) for examples.

_In an attempt to gather feedback to set future priorities, we're running a brief user survey asking: [what are you using `modifyWebpackConfig` for?](https://github.com/NYTimes/kyt/issues/432)_


## Setting up a kyt project
kyt-cli is a utility for bootstrapping kyt projects. It can be installed globally and run to create a new project or integrate kyt with an existing project.
Expand Down
3 changes: 3 additions & 0 deletions docs/kytConfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ and export an object with the following options.


## modifyWebpackConfig

_In an attempt to gather feedback to set future priorities, we're running a brief user survey asking: [what are you using `modifyWebpackConfig` for?](https://github.com/NYTimes/kyt/issues/432)_

`modifyWebpackConfig` is an optional callback you can define to edit the Webpack config for each part of development.
This allows you to add new babel-plugins, modify Webpack loaders, etc.

Expand Down
5 changes: 5 additions & 0 deletions packages/kyt-core/utils/kytConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ module.exports = (optionalConfig) => {

config = merge({}, baseConfig, config);

if (typeof config.modifyWebpackConfig === 'function') {
logger.info('What are you doing in your modifyWebpackConfig?');
logger.info('Let us know: https://github.com/NYTimes/kyt/issues/432');
}

// Create default identity functions for modify functions
['modifyWebpackConfig', 'modifyJestConfig'].forEach((m) => {
if (typeof config[m] !== 'function') {
Expand Down

0 comments on commit 715c857

Please sign in to comment.