Skip to content

Commit 1e837c2

Browse files
authored
Docs: Clarify reexport
1 parent b8e2ceb commit 1e837c2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/Components.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ But will ignore tests:
2525
* `__tests__` folder,
2626
* files containing `.test.js` or `.spec.js` (or same for `.jsx`, `.ts` and `.tsx`).
2727

28-
If it doesn’t work for you, create a `styleguide.config.js` file in your project’s root folder and configure the patterns to fit your project structure. For example, if your components look like `components/Button/Button.js` + `components/Button/index.js` (meaning you need to skip `index.js`, otherwise the component will be loaded twice):
28+
If it doesn’t work for you, create a `styleguide.config.js` file in your project’s root folder and configure the patterns to fit your project structure.
29+
30+
For example, if your component files look like `components/Button/Button.js`, but you rexport them in `components/Button/index.js` (like `export { default } from './Button'`) to simplify imports (`components/Button` instead of `components/Button/Button`), you need to skip `index.js`:
2931

3032
```javascript
3133
module.exports = {

0 commit comments

Comments
 (0)