Skip to content

Commit

Permalink
Fix rewrite shape in Storybook (#24827)
Browse files Browse the repository at this point in the history
This fixes a bug in `@next/plugin-storybook` caused by an update in the rewrite structure, solution was provided by @stefanprobst #19345 (comment)

Secondary question: it would be awesome if someone at Next could help translating `preset.js` into TypeScript, this would catch those bugs immediately. I've tried in #18367 but failed to build correctly.

## Bug

- [X] Related issues linked using `fixes #number` => parent issue is an umbrella of various small issues: #19345
- [X] Integration tests added => reproduction is implemented in https://github.com/lbke/next-plugin-storybook-demo until the package is more stable
  • Loading branch information
eric-burel authored May 6, 2021
1 parent 467ec21 commit 796c021
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/next-plugin-storybook/preset.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ async function webpackFinal(config) {
target: 'server',
config: nextConfig,
buildId: 'storybook',
rewrites: [],
rewrites: { beforeFiles: [], afterFiles: [], fallback: [] },
})

config.plugins = [...config.plugins, ...nextWebpackConfig.plugins]
Expand Down

0 comments on commit 796c021

Please sign in to comment.