Soya Next
  • Introduction
  • Packages
    • soya-next
    • soya-next-cli
    • soya-next-scripts
    • soya-next-server
  • Getting Started
    • Setup
    • Directory Structure
    • Creating an App
    • Build the App for Production
  • User Guide
    • Analyzing Dependencies
    • Configure Redux Store
    • Custom Babel Configuration
    • Custom Document
    • Custom Marlint Configuration
    • Custom Routing
    • Typescript Configuration
    • Universal Environment Configuration
  • Migration Guide
    • 0.4.x to 0.5.x
  • API Reference
    • applyReducers([reducers])
    • createPage([...connectArgs])(Page, [reducers])
    • createRouter(app, [options])
    • withLocale
    • LocaleLink
  • Examples
    • Apollo
    • Authentication
    • CSS Modules
    • CSS Modules with SCSS
    • Custom Routes
    • Internationalization
    • Internationalization with Redux
    • Redirection
    • TodoMVC
  • License
Powered by GitBook
On this page
  • Installation
  • Configuration
  1. Getting Started

Setup

PreviousGetting StartedNextDirectory Structure

Last updated 7 years ago

Installation

There are 3 packages that you need to install:

  • - A set of utility functions for React applications built on top of Next.js

  • - A CLI which contains configuration and scripts used by

  • - 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 . 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.

soya-next
soya-next-scripts
soya-next-cli
soya-next-server
soya-next-scripts