Problem when fetching data async in preprocessor - what to do? #9865
NicolajHansenPersonal
started this conversation in
General
Replies: 1 comment 1 reply
-
There are similar questions.
As far as I knows docfx don't providing Jint customization options. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a task that has me calling an api to fetch some data, that I would like to be rendered in one of my templates. Setting up the preprocessor .js file, using the exports.transform function to alter the model, I run into some problems when trying to use "await fetch()" to get the data. It simply wont work.
If I place the call in a try catch, the error message I get is "fetch is not defined"?
Anyone with some good ideas how to work with API calls in docfx and be able to work with the data before using it :)
Kind regards
Nicolaj
Beta Was this translation helpful? Give feedback.
All reactions