-
Notifications
You must be signed in to change notification settings - Fork 10
Lazy compile with storybook preset causes double build on initialization #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Could you provide a reproduction-repo? |
Sure! Ran into some setup issues when duplicating fresh repo. Reaching out to storybook team first. |
There was an issue I ran into trying to repro. But found out it doesn't even work with most recent storybook. |
@liximomo I think I have some new information. Reached out to storybook team, and they are using https://www.npmjs.com/package/virtual-module-webpack-plugin
utime relies on the file system on found modules. And that is causing it to be incompatible with newer storybook version. |
@liximomo I have successfully duplicated the bug in the repository: To start the app, clone the repo, do In our production repo, one build takes 2 minutes, so... rebuilding means waiting for 2 more minutes randomly, that means it defeats the purpose of saving time on lazy compile. Additional context: Would greatly appreciate it if you can take a look. I really want to use this in our official dev environment |
Reopening a new issue as too much irrelevant information is in this thread |
I tried to do react lazy with storybook 5.x preset, and use lazy compile webpack plugin. The result is flaky.
Sometime it build once, and works (20% of the time), other times it will finish lazy build, and immediately initiate another build.
Aside from default storybook webpack preset, we are using ts-loader and a bunch of other loaders, we are not using any additional plugins though.
It seems like on the second build, it's trying to build all React.Lazy bundles.
In our story files, we did something like
Any idea why this might be happening?
The text was updated successfully, but these errors were encountered: