diff --git a/.eslintrc.cjs b/.eslintrc.cjs index eb237a3..3a65063 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -32,6 +32,7 @@ module.exports = { semi: false, }, ], + 'no-case-declarations': 'off', }, parser: 'vue-eslint-parser', parserOptions: { diff --git a/package.json b/package.json index 97d746f..e1fc8dc 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "scripts": { "dev": "vite", "build": "vue-tsc && vite build", + "build:prod": "export NODE_ENV=production && vue-tsc && vite build", "preview": "vite preview", "lint": "eslint src --ext .js,.ts,.vue", "gen-api": "node ./scripts/gen-api.js", diff --git a/src/lib/apis/index.ts b/src/lib/apis/index.ts index c1b0fc8..b224473 100644 --- a/src/lib/apis/index.ts +++ b/src/lib/apis/index.ts @@ -3,7 +3,7 @@ import { Apis, Configuration } from './generated' const api = new Apis( new Configuration({ basePath: - import.meta.env.MODE === 'production' + process.env.NODE_ENV === 'production' ? 'https://trap.show/h24s_19_server' : 'http://localhost:3000', }),