Hot answers tagged

2

Another solution would be to add support for environment variables in your JSS bundle. It was added already for Next.js: https://github.com/Sitecore/jss/pull/527/files but it works also for React with one difference in generate-config.js: instead of const computedConfig: { [key: string]: string } = {}; use just const computedConfig = {}; rest of the changes ...


2

We had similar requirement to distinguish whether page is secured or not. Based on that we are then checking whether user is authenticated or not. Implementation is using React but I think for Angular it will be similar in your case. We have added new field of type checkbox "securedRoute" to /sitecore/definitions/route.sitecore.js: In the route ...


1

Found it under: sitecore > System > Workflows > JSS Development Workflow In the Content tab under Data there is a field "Initial state" which I changed to Content Mode!


1

The global jss cli version on the machine was correctly 16.0.0, meanwhile the jss cli version declared in the project's package.json was 15.x.x, updating the package.json to ^16.0.0 and and a fresh npm i seemed to do the trick!


1

In the file "Sitecore.Services.GraphQL.config" located under path_to_sitecore_instance\App_Config\Sitecore\Services.GraphQL you can find these notes and config elements (at least in my current Sitecore 9.3 JSS Sitecore site) on line 82: <!-- COMPLEXITY CONFIGURATION It is possible to conduct denial of service attacks by constructing ...


1

It really depends on your requirements, what you'd like to achieve and in what timeframe. You should consider that even if 10.1 just released, it will take some time until the project you want to migrate to will be released. If you plan on having all the sitecore capabilities (like personalization) in your React app you should use the first two options, as ...


1

So apparently left out a detail that i didn't realize was important. My angular code was running on a node server, meaning that sitecore was working in headless mode. In the JSS forms documentation: If you are using headless mode, set sitecoreApiHost={''}, so requests will be sent directly to your node server. If you send requests directly to Sitecore ...


1

We have two scjssconfig.json files in root of our solution. One with the same name that is used by developers and second one with .dist suffix in name. During build we remove the file without suffix and remove.dist suffix from the other. scjssconfig.json.dist looks like this: { "sitecore": { "instancePath": "d:\\home\\site\\...


Only top voted, non community-wiki answers of a minimum length are eligible