Npmrc for cloudflare pages

Hello,
I would like to set up custom npmrc configuration to use a private npm repository, something like

//npm.greensock.com/:_authToken=abcde-fghi-
@gsap:registry=https://npm.greensock.com

is this possible with cloudflare pages? I tried putting an .npmrc inside the repo but it didn’t work.

thanks
Davide

I have a similar issue, but with a git+ssh dependency.
I added a preinstall script to add git config.

package.json

{
  "scripts": {
    "preinstall": "scripts/preinstall.sh"
  },
}

preinstall.sh

#!/bin/bash
if [ "$GITHUB_AUTH_TOKEN" != "" ]; then
    echo "Detected GITHUB_AUTH_TOKEN. Setting git config to use the security token" >&1
    git config --global url."https://${GITHUB_AUTH_TOKEN}@github.com".insteadOf ssh://[email protected]
fi

Maybe you can use a similar technique to create .npmrc

Kind Regards,
Frank