DEV Community

Discussion on: One Build System - Multiple Vue Apps - Shared Components

Collapse
david_mark profile image
David Mark
  "scripts": {

    "serve:main": "env APP_TYPE=\"main-app\" vue-cli-service serve main-app/src/main.ts",
    "build:main": "env APP_TYPE=\"main-app\" vue-cli-service build main-app/src/main.ts",

    "serve:subdoms": "env APP_TYPE=\"subdoms-app\" vue-cli-service serve subdoms-app/src/main.ts",
    "build:subdoms": "env APP_TYPE=\"subdoms-app\" vue-cli-service build subdoms-app/src/main.ts"

  },
Enter fullscreen mode Exit fullscreen mode

env doesn't work on windows command prompt but can use this npm package to get around it:

npmjs.com/package/cross-env