Okay
  Print

How to setup non monorepo for Isomorphic Next.js version?

if you want to run the non monorepo version of isomorphic-next you need to do the following,

1. copy isomorphic-next content to your next.js app

2. copy each folder from inside the shared directory to the root of your next js app. It's better if copy the content of the container, redux and other directories that are already available on your next.js app so that you don't replace them.  put the contents [except package.json] from shared/redux and shared/containers to the containers and redux directory of your app.

3. and add the below aliasing to your next.config.js file. 

const path = require("path");
module.exports = {
    webpack(config, options) {
        config.resolve.alias = {
            ...config.resolve.alias,
            "@iso/assets": path.join(__dirname, "assets"),
            "@iso/components": path.join(__dirname, "components"),
            "@iso/config": path.join(__dirname, "config"),
            "@iso/containers": path.join(__dirname, "containers"),
            "@iso/redux": path.join(__dirname, "redux"),
            "@iso/lib": path.join(__dirname, "library"),
            "@iso/ui": path.join(__dirname, "UI"),
        };
        return config;
    },
};

4. some of the package might be missing in the package.json file since we are using monorepo so you might need to install them based on the module not found error.