Skip to content

Commit

Permalink
refactor: remove controller deps in http
Browse files Browse the repository at this point in the history
  • Loading branch information
hexqi committed Feb 26, 2024
1 parent 643fb20 commit e390ea7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
1 change: 0 additions & 1 deletion packages/http/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
"license": "MIT",
"homepage": "https://opentiny.design/tiny-engine",
"dependencies": {
"@opentiny/tiny-engine-common": "workspace:*",
"@opentiny/tiny-engine-utils": "workspace:*",
"@opentiny/vue": "~3.10.0",
"@vueuse/core": "^9.6.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/http/src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*
*/

import { VITE_ORIGIN, isDevelopEnv } from '@opentiny/tiny-engine-controller/js/environments'
import { VITE_ORIGIN, isDevelopEnv } from './environments'

const baseURL = VITE_ORIGIN

Expand Down
4 changes: 4 additions & 0 deletions packages/http/src/environments.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export const VITE_ORIGIN = import.meta.env.VITE_ORIGIN
export const isMock = import.meta.env.VITE_API_MOCK === 'mock'
export const isVsCodeEnv = window.vscodeBridge
export const isDevelopEnv = import.meta.env.MODE?.includes('dev')
2 changes: 1 addition & 1 deletion packages/http/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
/* eslint-disable no-undef */
import axios from './axios'
import { createApp } from 'vue'
import { isMock, isVsCodeEnv, isDevelopEnv } from '@opentiny/tiny-engine-controller/js/environments'
import { isMock, isVsCodeEnv, isDevelopEnv } from './environments'
import { useBroadcastChannel } from '@vueuse/core'
import Login from './Login.vue'
import config from './config'
Expand Down

0 comments on commit e390ea7

Please sign in to comment.