Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
- Remove references to `useSWC`
  • Loading branch information
kylegach committed Jan 10, 2024
1 parent 5c09346 commit d494c85
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 31 deletions.
12 changes: 1 addition & 11 deletions docs/get-started/nextjs.md
Original file line number Diff line number Diff line change
Expand Up @@ -901,20 +901,10 @@ The available options are:

#### `builder`

Type:

```ts
{
useSWC?: boolean;
}
```
Type: `Record<string, any>`

Configure options for the [framework's builder](../api/main-config-framework.md#optionsbuilder). For Next.js, that builder is Webpack 5.

##### `builder.useSWC`

Use the SWC compiler instead of Babel. [More information is available here.](../api/main-config-framework.md#optionsbuilderuseswc)

#### `image`

Type: `object`
Expand Down
12 changes: 2 additions & 10 deletions docs/snippets/react/nextjs-add-framework.js.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,7 @@
// .storybook/main.js
export default {
// ...
framework: {
// name: '@storybook/react-webpack5', // 👈 Remove this
name: '@storybook/nextjs', // 👈 Add this
options: {
builder: {
// Set useSWC to true if you want to try out the experimental SWC compiler in Next.js >= 14.0.0
useSWC: true,
},
},
},
// framework: '@storybook/react-webpack5', 👈 Remove this
framework: '@storybook/nextjs', // 👈 Add this
};
```
12 changes: 2 additions & 10 deletions docs/snippets/react/nextjs-add-framework.ts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,8 @@ import { StorybookConfig } from '@storybook/nextjs';

const config: StorybookConfig = {
// ...
framework: {
// name: '@storybook/react-webpack5', // 👈 Remove this
name: '@storybook/nextjs', // 👈 Add this
options: {
builder: {
// Set useSWC to true if you want to try out the experimental SWC compiler in Next.js >= 14.0.0
useSWC: true,
},
},
},
// framework: '@storybook/react-webpack5', 👈 Remove this
framework: '@storybook/nextjs', // 👈 Add this
};

export default config;
Expand Down

0 comments on commit d494c85

Please sign in to comment.