Electron Js build is not working while using Yarn workspace (monorepo)

Viewed 87

We created the folder structure like project 1 common project 2

In common folder we put all react state management logic and common component accessing the state like:

import configureStore from 'common/app/state/configureStore'

package.json file for monorepo:

{
  "private": true,
  "workspaces": [
    "common",
    "project1",
    "project2"
  ],
  "scripts": {
    "w1": "yarn workspace project1 dev",
    "modules:build": "yarn wsrun --stages build",
    "w2": "yarn workspace project2 dev",
    "w3": "yarn workspace project1 dev",
    "w3_build": "yarn workspace project1 package:production",
    "w4_build": "yarn workspace project1 package:production",
    "build": "yarn modules:build; yarn --cwd project1 package:production"
  },
  "dependencies": {
    "wsrun": "^5.2.4"
  }
}

trying to create the build using "yarn build" build created successfully but can not accessing state management logic

Structure is working fine in development mode

Please help us to resolve the issue

0 Answers
Related