#!/bin/bash

# Build typescript.
yarn build
cp ./next.config.js ./lib/next.config.js


# Delete type files.
# NB: The Typescript types [.d.ts] files cause next to fail to build.
cd lib
# find . -name "*.d.ts" -type f -delete


# Run the build.
cd ..
next build ./lib
