I have created monorepo using yarn workspace which have two microfrontends app developed using webpack module federation and one ui lib application which has storybook also. When I am trying to run storybook in monorepo, it is giving below error
Cannot read property 'createSnapshot' of undefined at/node_modules/html-webpack-plugin/lib/webpack5/file-watcher-api.js
When I am running my ui lib outside of monorepo, it is running fine, but when I am including ui lib as part of monorepo, it is hoisting node modules and started using webpack5 which is causing an issue. I am not able to figure it out how to make it work. I don't want to create polyrepo as then sharing ui lib become bit tedious but because of storybook and ui lib sharing I want to go with monorepo but it is causing an issue.