Hi all,
This may be a dumb question, but something recently changed in my Sage 10 project that caused my dev mode to stop properly injecting JS. Builds continued to run just fine. After some digging, I found that all my entrypoint scripts included an unrecognized dependency of ‘wp-react-refresh-runtime’ which was preventing the main enqueuing from happening. Some further digging took me to the file: node_modules/@roots/wordpress-transforms/lib/wordpress.js, and specifically the function requestMap which I gather tries to parse certain aspects of theme code in order to understand what dependencies should be enqueued when calling the bundle method… (I think).
So my question is: what did I do to cause this dependency to appear and/or what did I do to break the dependency if it’s normal? I don’t have any react-type code in my theme - just vanilla JS and some AlpineJS sprinkled through templates.
Any help would be appreciated! Btw: commenting out the relevant line in node_modules/@roots/wordpress-transforms/lib/wordpress.js removed the dep in entrypoints.js and allows scripts to load as normal, but that’s obviously not a real fix.
Thanks!