Skip to content

Commit

Permalink
refactor: Refactor .storybook/main.cjs
Browse files Browse the repository at this point in the history
Add async viteFinal function to merge config and define SANDPACK_UNSTYLED_COMPONENTS as false.
  • Loading branch information
danilowoz committed Oct 30, 2023
1 parent 5a72b66 commit 169e15c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions sandpack-react/.storybook/main.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ module.exports = {
features: {
storyStoreV7: false, // 👈 Opt out of on-demand story loading
},

async viteFinal(config, { configType }) {
return mergeConfig(config, {
define: {
"process.env.SANDPACK_UNSTYLED_COMPONENTS": "false",
},
});
},
};

function getAbsolutePath(value) {
Expand Down

0 comments on commit 169e15c

Please sign in to comment.