Skip to content

Commit

Permalink
fix: collect story loader not clearing vite cache
Browse files Browse the repository at this point in the history
  • Loading branch information
Akryum committed Apr 24, 2022
1 parent 2fbb9d9 commit a6bbc53
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/histoire/src/node/collect/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@ export function useCollectStories (options: UseCollectStoriesOptions, ctx: Conte
const threadPool = new Tinypool({
filename: new URL('./worker.js', import.meta.url).href,
// WebContainer compatibility (Stackblitz)
useAtomics: false,
useAtomics: typeof process.versions.webcontainer !== 'string',
})

function clearCache () {
server.moduleGraph.invalidateAll()
node.fetchCache.clear()
}

Expand Down

0 comments on commit a6bbc53

Please sign in to comment.