Skip to content

Installation

Automatic Installation

You can install the starter monorepo :

git clone https://github.com/GeekyAnts/unitools-starter

Manual Installation

The installation process for Unitools is straightforward. You can install the required packages using npm or yarn.

Next.js

Run the following commands to install all the packages supported under unitools.

Terminal window
npm install @unitools/image @unitools/link @unitools/router @unitools/image-next @unitools/link-next @unitools/router-next

Expo

Run the following commands to install all the packages supported under unitools.

Terminal window
npm install @unitools/image @unitools/link @unitools/router @unitools/image-expo @unitools/link-expo @unitools/router-expo

Install the required peer-dependencies.

Terminal window
npm install expo-image expo-router

Configuration

For @unitools/image, @unitools/link, and @unitools/router to work in Next.js we need to alias it with @unitools/image-next, @unitools/link-next, and @unitools/router-next respectively

next.config.js
module.exports = {
webpack: (config) => {
config.resolve.alias['@unitools/image'] = '@unitools/image-next';
config.resolve.alias['@unitools/link'] = '@unitools/link-next';
config.resolve.alias['@unitools/router'] = '@unitools/router-next';
return config;
},
};