Unverified Commit 796c0212 authored by Eric Burel's avatar Eric Burel Committed by GitHub

Fix rewrite shape in Storybook (#24827)



This fixes a bug in `@next/plugin-storybook` caused by an update in the rewrite structure, solution was provided by @stefanprobst https://github.com/vercel/next.js/issues/19345#issuecomment-818856655

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 https://github.com/vercel/next.js/pull/18367 but failed to build correctly.

## Bug

- [X] Related issues linked using `fixes #number` => parent issue is an umbrella of various small issues: https://github.com/vercel/next.js/issues/19345
- [X] Integration tests added => reproduction is implemented in https://github.com/lbke/next-plugin-storybook-demo until the package is more stable
parent 467ec211
......@@ -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]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment