Setup
Installation
There are 3 packages that you need to install:
soya-next - A set of utility functions for React applications built on top of Next.js
soya-next-scripts - A CLI which contains configuration and scripts used by soya-next-cli
soya-next-server - Production server for Soya Next
Both packages have their own dependencies that need to be installed, run the following to install them:
npm install --save config express next react react-cookie react-dom react-redux redux
Then, to install soya-next, soya-next-scripts, and soya-next-server, run the following:
npm install --save soya-next soya-next-server
npm install --save-dev soya-next-scripts
Configuration
You won't need to do any configuration because everything is already configured in soya-next-scripts. Simply add the following into your package.json
scripts section:
{
"analyze": "BUNDLE_ANALYZE=both soya-next-scripts build",
"analyze:browser": "BUNDLE_ANALYZE=browser soya-next-scripts build",
"analyze:server": "BUNDLE_ANALYZE=server soya-next-scripts build",
"build": "soya-next-scripts build",
"dev": "soya-next-scripts dev",
"export": "soya-next-scripts export",
"start": "soya-next-server",
"test": "soya-next-scripts test"
}
You're ready to create your first React application in Soya Next now.
Last updated