Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

Commit

Permalink
Merge pull request #57 from k99k5/main
Browse files Browse the repository at this point in the history
🐛 fix: use config.base for dev mode in request.js
  • Loading branch information
k99k5 committed Feb 24, 2024
2 parents 20ff553 + 30701d4 commit 622cada
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const toJson = (data) => {
}

const service = axios.create({
baseURL: (import.meta.env.SSR ? config.base : '') + `/api`,
baseURL: ((import.meta.env.SSR || import.meta.env.MODE === 'dev') ? config.base : '') + `/api`,
timeout: 30000,
headers: {
'Content-Type': 'application/json;charset=utf-8',
Expand Down

0 comments on commit 622cada

Please sign in to comment.