'ScandiPWA is not working with custom Magento URl

Description: I have installed scandipwa on my local machine and run the app(npm start- development mode), It works well with the default Magento URL which is configured under the package.json file(both base and node modules). But, when we change the baseUrl with my local Magento server URL as per the given documentation. https://docs.scandipwa.com/getting-started-1/storefront-mode/proxying-requests-to-server. Then, we execute the app again, it shows a 404 error on the home page.

I got this error after integrating with my custom Magento URL

and also we tried manually proxying still it throws a 404 error.

src/setupProxy.js


module.exports = function(app) {
app.use(
'/graphql',
createProxyMiddleware({
target: '*<https://--- our Magento server url --->',
changeOrigin: true,
})
);
};```


Can you provide any additional references for custom Magento integration on scandipwa?


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source