Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

fetch in before_build hook?

Venkata Rahul SMay 11 2022

Before I build my application, I want to create a configuration file, contacting a specific internal configuration system whic exposes the configuration data for the build using a REST API.
So, I am customizing the before_build hook, but am unable to include the fetch library.
Apparently, Node includes the MDN Fetch library only from v17 and onwards. So for earlier versions of NodeJS, this option is ruled out.
Another way of looking at this is that somewhere within the OJET library itself, a fetch library is presumably in use. The existence of a RESTDataProvider hints so. So I can use that library. But what exatly should I write into the require instruction at the top of the before build hook is not clear.
Add node-fetch to the library but that may be sub-optmial, because this is needed for build time only.
What is the way out? 2 seems the obvious choice but can someone please help me with the name of the library to be imported?

This post has been answered by John JB Brock-Oracle on May 13 2022
Jump to Answer

Comments

Processing

Post Details

Added on May 11 2022
1 comment
93 views