From 62eed454e823fb4e86a966c8c3b009024205c25c Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 26 Nov 2019 15:09:26 +0100 Subject: [PATCH] MIGRATE guide-preact documentation to triconfig --- docs/src/pages/guides/guide-preact/index.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/src/pages/guides/guide-preact/index.md b/docs/src/pages/guides/guide-preact/index.md index b4f9e0fdf17..ad59164a42f 100644 --- a/docs/src/pages/guides/guide-preact/index.md +++ b/docs/src/pages/guides/guide-preact/index.md @@ -47,16 +47,16 @@ Then add the following NPM script to your `package.json` in order to start the s } ``` -## Step 3: Create the config file +## Step 3: Create the main file For a basic Storybook configuration, the only thing you need to do is tell Storybook where to find stories. -To do that, create a file at `.storybook/config.js` with the following content: +To do that, create a file at `.storybook/main.js` with the following content: ```js -import { configure } from '@storybook/preact'; - -configure(require.context('../src', true, /\.stories\.js$/), module); +module.exports { + stories: ['../src/**/*.stories.[tj]s'], +}; ``` That will load all the stories underneath your `../src` directory that match the pattern `*.stories.js`. We recommend co-locating your stories with your source files, but you can place them wherever you choose.