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
React app, using typescript.
version 3.2.2 of the sp-rest-proxy
I am not understanding your intructions for typescript.
You include the following in the docs:
import RestProxy, { IProxySettings } from 'sp-rest-proxy/dist/RestProxy';
sp-rest-proxy is a Node.js library. So you won't import it in a React/Frontend sources as such code can't be bundled for a browser.
Proxy is a "side car" process which runs as Node server next to local dev server.
Usually, a client side project's TypeScript settings are different from a server side TypeScript project and it could be not a straight forward to configure both within the same code base. At the same time, it's a little scaffolding code you need for a proxy server.js. I'd recommend just following these steps for simplicity.
If your dev tools expose WebPack - this approach can be handy.
React app, using typescript.
version 3.2.2 of the sp-rest-proxy
I am not understanding your intructions for typescript.
You include the following in the docs:
import RestProxy, { IProxySettings } from 'sp-rest-proxy/dist/RestProxy';
const settings: IProxySettings = {
configPath: './config/private.json'
};
const restProxy = new RestProxy(settings);
restProxy.serve();
But I dont know where this is supposed to go, serve.js? Any guidance appreciated .
The text was updated successfully, but these errors were encountered: