mirror of
https://github.com/notherealmarco/WASAPhoto.git
synced 2025-03-13 13:35:23 +01:00
Fix axios base url on embedded build
This commit is contained in:
parent
0bd6f4461d
commit
97c1e3e00f
3 changed files with 6 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Example app</title>
|
||||
<title>WASAPhoto</title>
|
||||
<meta charset="UTF-8">
|
||||
<link rel="icon" href="/favicon.ico"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
"dev": "vite",
|
||||
"build-dev": "vite build --mode development",
|
||||
"build-prod": "vite build --mode production",
|
||||
"build-embed": "vite build --mode production --base=/dashboard/",
|
||||
"build-embed": "vite build --mode embedded --base=/dashboard/",
|
||||
"preview": "vite preview --port 4173"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
@ -17,6 +17,10 @@ export default defineConfig(({command, mode, ssrBuild}) => {
|
|||
ret.define = {
|
||||
"__API_URL__": JSON.stringify("http://localhost:3000"),
|
||||
};
|
||||
} else if (mode === 'embedded') {
|
||||
ret.define = {
|
||||
"__API_URL__": JSON.stringify("/"),
|
||||
};
|
||||
} else {
|
||||
ret.define = {
|
||||
"__API_URL__": JSON.stringify("http://localhost:3000"),
|
||||
|
|
Loading…
Reference in a new issue