This repo shows the issues with latest version of react-cosmos not working with vite or webpack. Github issue: react-cosmos/react-cosmos#1451 (comment)