diff --git a/scripts/generate.sh b/scripts/generate.sh
index 1dbbf3ae710..5ddf65cb573 100755
--- a/scripts/generate.sh
+++ b/scripts/generate.sh
@@ -69,8 +69,6 @@ typescript_fetch () {
 
   config_file=./config/client/typescript-fetch.yml.proc.yml
   if [ $project == "client" ]; then
-    echo "Adding contrib files"
-    echo "export * from './contrib';" >> "${dir}/src/index.ts"
     config_file=./config/client/typescript-client-fetch.yml.proc.yml
   fi
 
@@ -82,6 +80,11 @@ typescript_fetch () {
     --git-host github.com \
     -c ./config/client/typescript-client-fetch.yml.proc.yml
 
+  if [ $project == "client" ]; then
+    echo "Adding contrib files"
+    echo "export * from './contrib';" >> "${dir}/src/index.ts"
+  fi
+
   file="${dir}/package.json"
   jq -r ".author = "'"'"Ory Corp"'"'" | .license = "'"'"Apache-2.0"'"' "${file}" \
      > tmp.$$.json && mv tmp.$$.json "${file}"