After upgrading to Redwood v8 I’ve noticed that the new Storybook vite build process is emitting thousands of the follow messages on build:
[plugin mock-@redwoodjs/auth] Sourcemap is likely to be incorrect: a plugin (mock-@redwoodjs/auth) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help
[plugin mock-@redwoodjs/router] Sourcemap is likely to be incorrect: a plugin (mock-@redwoodjs/router) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help
I’ve also had to start running yarn rw sb --build with my node max memory increased to 4GB in order to get the build to finish.
I’m not able to reproduce this with a brand new project, so it seems to be somehow related to something we are doing. I just haven’t been able to figure out what. I tried just setting stories: [] in the .storybook/main.js config, but get the same result (thousands of messages, memory exhaustion). Based on the messages, I’m wondering if there is some sort of recursive issue with our routes and auth config.
Any ideas for how to troubleshoot further would be appreciated!
The next thing I’d like to look at is if I can fiddle with the mock-@redwoodjs/router and mock-@redwoodjs/auth to see if that has any effect (or if this is just some general Vite thing).
It’s interesting that it’s emitting those errors for your project, but not otherwise. Let us know if you’re able to put together a repro or if there’s anything we can do to help with your investigation!
Update: I haven’t looked at the mocks yet, but after upgrading to v8.3.0 the build completes without changing the memory limit. There is a still the same crazy amount of messages about sourcemaps, so maybe that is unrelated and harmless