Skip to content

Commit

Permalink
Fix: Simplify webpack config auto load (#323)
Browse files Browse the repository at this point in the history
1. Search for webpack config only in the root folder.
2. Only search for webpack.config.js and webpackfile.js.
3. Simplify webpack style guide example.
  • Loading branch information
sapegin committed Mar 29, 2017
1 parent 0f84edd commit 6e15c37
Show file tree
Hide file tree
Showing 19 changed files with 4,912 additions and 1,268 deletions.
2 changes: 1 addition & 1 deletion docs/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ See [Configuring webpack](./Webpack.md) for examples.

Type: `String`

By default Styleguidist will try to find webpack config (`webpack.config.dev.js` or `webpack.config.js`) anywhere in your project and use it. Use this option to specify a custom path to your webpack config.
By default Styleguidist will try to find `webpack.config.js` in your project’s root directory and use it. Use this option to specify a custom path to your webpack config.

```javascript
module.exports = {
Expand Down
2 changes: 1 addition & 1 deletion docs/Webpack.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Styleguidist uses [webpack](https://webpack.js.org/) under the hood and it needs
## Reusing your project’s webpack config

By default Styleguidist will recursively try to find an existing webpack config (`webpack.config.dev.js` or `webpack.config.js`) in your project and use it.
By default Styleguidist will try to find `webpack.config.js` in your project’s root directory and use it.

If your webpack config is located somewhere else, add its location to your `styleguide.config.js`:

Expand Down
28 changes: 0 additions & 28 deletions examples/webpack/config/env.js

This file was deleted.

12 changes: 0 additions & 12 deletions examples/webpack/config/jest/cssTransform.js

This file was deleted.

10 changes: 0 additions & 10 deletions examples/webpack/config/jest/fileTransform.js

This file was deleted.

45 changes: 0 additions & 45 deletions examples/webpack/config/paths.js

This file was deleted.

14 changes: 0 additions & 14 deletions examples/webpack/config/polyfills.js

This file was deleted.

208 changes: 0 additions & 208 deletions examples/webpack/config/webpack.config.dev.js

This file was deleted.

Loading

0 comments on commit 6e15c37

Please sign in to comment.