Closed pfauchere closed 4 years ago
cc @godanny86
issue tracked internally by CQ-4266178
Note a React developer may use static assets in his project, so I would set the proxy as follows to allow assets hosted by webpack:
app.use(proxy(
['**/*.model.json', '/content/**/*.jpg', '/content/**/*.jpeg', '/content/**/*.png'],
A cleaner solution could be to use: https://facebook.github.io/create-react-app/docs/proxying-api-requests-in-development#configuring-the-proxy-manually
ex:
react-app/src/setupProxy.js
By making this change we should be able to get rid of the following conditional step [0] and potentially the {{CustomModelClient}}. If necessary, the {{CustomModelClient}} could potentially be reintroduced in conjunction with an SSR setup.
[0] https://github.com/adobe/aem-spa-project-archetype/blob/development/src/main/resources/archetype-resources/react-app/src/index.js#L42-L47