Before Netlify I was registering modules while lanching node command, like this:
node -r my-module/register index.js
This will allow me to use that module in every part of my repo. The most common use of this is
node -r source-map-support/register index.js
UPDATE:
I have also tried to set the enviornment variable
NODE_OPTIONS='-r my-module/register'
NODE_OPTIONS='-r node_modules/my-module/register'
NODE_OPTIONS='-r node_modules/my-module/register.js'
NODE_OPTIONS='-r "my-module/register"'
NODE_OPTIONS='--require my-module/register'
NODE_OPTIONS='--require=my-module/register'
but with no success.
How can I achive this with Netlify?
Should I edit all my files and import it manually?
Why NODE_OPTIONS doesn’t work?
Thank you