pnpm production build for pnpm monorepo app having local workspace package dependency

I have pnpm monorepo and it works perfectly for local build and development server using build for app. For development, I am using

pnpm --filter=@ap/auth-service --prod deploy @prod/auth-service
pnpm --filter=@ap/order-service --prod deploy @prod/order-service

folder structure

root
├── package.json                   // Root level dependency
├── pnpm-workspace.yaml            // pnpm workspace configuration
├── packages                       // Packages folder containing shared, server, and services
│   ├── shared                     // Shared resources, if any
│   ├── server                     // Server related resources, if any
│   └── services                   // Common services folder
└── apps                           // Separate apps folder
    ├── auth-service
    │   ├── package.json           // Service specific dependency -> @ap/auth-service
    │   ├── tsconfig               // TypeScript configuration for auth-service
    │   └── src                    // Source code for auth-service
    └── order-service
        ├── package.json           // Service specific dependency -> @ap/order-service
        ├── tsconfig               // TypeScript configuration for order-service
        └── src                    // Source code for order-service

pnpm workspace.yaml

packages:
  - 'packages/*'
  - 'apps/*'

The build fodler dist file is taking the reference from the actual working package directory insted of build fodler, how can I use product ready build for pnpm monorepo which has local worsspace dependency

package.json

I tried pnpm deploy command which I assume is taking the local tsconfig for build

tsconfig.json

{
  "compilerOptions": {
    "strictNullChecks": false,
    "downlevelIteration": true,
    "removeComments": true,
    "strictPropertyInitialization": false,
    "declarationMap": true,
    "resolveJsonModule": true,
    "experimentalDecorators": true,
    "allowSyntheticDefaultImports": true,
    "allowJs": true,
    "esModuleInterop": true,
    "forceConsistentCasingInFileNames": true,
    "strict": true,
    "noImplicitAny": false,
    "skipLibCheck": true,
    "declaration": true,
    "target": "ES2021",
    "lib": ["ES2021", "dom"],
    "types": [
      "node",
      "jest"
    ],
    "sourceMap": true,
    "noUnusedLocals": false,
    "emitDecoratorMetadata": true,
    "moduleResolution": "node",
    "typeRoots": ["./node_modules/@types"],
    "suppressImplicitAnyIndexErrors": false,
    "module": "commonjs",
    "outDir": "./build",
    "baseUrl": ".",
    "paths": {
      "@user-module/*": ["src/module/user/*"],
      "@anc-module/*": ["src/module/organization/*"],
      "@product-module/*": ["src/module/auth/*"],
      "@config/*": ["src/config/*"],
      "@shared/*": ["src/shared/*"]
    }
  },
  "include": ["."],
  "exclude": ["build", "node_modules", "coverage"]
}

HOw this pnpm deploy comand is taking build command of the package and using tsconfig , if I use build command directly using thus

rimraf ./build && npx tsc

This also produce same result build as this command
pnpm –filter=@sn/auth-service –prod deploy @prod/auth-service

After build I run the pnpm install command inside the deployed folder @prod/auth-service, which I assume should install all the dependency for the auth service in node_module, which I can see is in the node_module as
@ap/shared @ap/service @ap/server

I am not able to use the build fodler indepepdenclty with node modules as the imports are still reffering to the original package code instead of node+modules which should be isntalled from the

package.json

{

  "scripts": {
    "start:dev": "NODE_ENV=development&&nodemon",
    "start": "NODE_ENV=production&& node build/src/index.js",
    "build": "rimraf ./build && npx tsc",
    "test": "NODE_ENV=development jest"
  },
  
  "dependencies": {
    "@sinclair/typebox": "^0.31.17",
    "@ap/server": "workspace:^",
    "@ap/service": "workspace:^",
    "@ap/shared": "workspace:^",
    "dotenv": "^16.0.3",
   
  },
 
}

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật