lqc520 / uniapp-plugin

uniapp插件开发
Other
116 stars 5 forks source link

可以运行package.json中配置的自定义环境吗? #120

Closed thornboo closed 1 month ago

thornboo commented 1 month ago

我使用插件的运行h5项目,无法加载package.json中的环境变量,这个有解决办法吗?


{"uni-app": {
    "scripts": {
      "dev": {
        "title": "开发环境",
        "browser": "chrome",
        "env": {
          "UNI_PLATFORM": "h5",
          "VUE_APP_CLIENT_TYPE": "android",
          "VUE_APP_PRODUCT_CODE": "app",
          "VUE_APP_TOKEN_KEY": "token",
          "VUE_APP_BASE_URL": "/api",
          "VUE_APP_AMAP_JS_KEY": "iusdjf23kk2h3g4k2jh34kj23hg",
          "VUE_APP_AMAP_WEB_KEY": "wkeje9w0992v23vinveiuo234fbvi",
          "VUE_APP_XTDQ_KEY": "lkhta98sdasda68576asygduAYSDGUYUYA76UUYI"
        },
        "define": {
          "DEV": true
        }
      }
    }
  }
}
lqc520 commented 1 month ago

不支持