You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran into this issue as well. The docs are correct as far as I can tell, but it's hard to understand what they're suggesting. What I did was remove all imports of react-storefront-connector from my code. After you've done that, you can import handlers you've created yourself, or implement your logic directly in each "api page."
I'm importing my handlers so that I can potentially turn my implementation into a connector.
For any maintainers, I think it would be great if this configuration could accept null or undefined values for the connector!
OK. I provided a dummy implementation for routes.api by returning an empty json. This solved my problem. However, your approach seems better, as it optimizes by removing unneeded imports.
Bug report
Mock connector code executes, even after I comment the connector line in next.config.js.
Describe the bug
After reading the official documentation (as presented here), I commented out the connector line in next.config.js.
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
2.Edit next.config.js by removing the connector line
3.do npm install to download all dependencies
Expected behavior
The program should successfully compile and the connector API such as /api/session, and /api/routes should not be invoked.
Screenshots
Web console logs indicating calls from mock-connector code
If applicable, add screenshots to help explain your problem.
System information
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: