Skip to content

Commit

Permalink
Clarify rootDir config
Browse files Browse the repository at this point in the history
  • Loading branch information
IanVS committed Sep 5, 2023
1 parent 8f92656 commit 0cfcf67
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,15 @@ export default {
// ... your existing storybook config
async viteFinal(config, { configType }) {
return mergeConfig(config, {
plugins: configType === 'PRODUCTION' ? [turbosnap({ rootDir: config.root ?? process.cwd() })] : [],
// ...And any other config you need to change...
plugins:
configType === "PRODUCTION"
? [
turbosnap({
// This should be the base path of your storybook. In monorepos, you may only need process.cwd().
rootDir: config.root ?? process.cwd(),
}),
]
: [],
});
},
};
Expand Down

0 comments on commit 0cfcf67

Please sign in to comment.