mirror of
https://github.com/notherealmarco/WASAPhoto.git
synced 2025-05-05 12:22:35 +02: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>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<title>Example app</title>
|
<title>WASAPhoto</title>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<link rel="icon" href="/favicon.ico"/>
|
<link rel="icon" href="/favicon.ico"/>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build-dev": "vite build --mode development",
|
"build-dev": "vite build --mode development",
|
||||||
"build-prod": "vite build --mode production",
|
"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"
|
"preview": "vite preview --port 4173"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -17,6 +17,10 @@ export default defineConfig(({command, mode, ssrBuild}) => {
|
||||||
ret.define = {
|
ret.define = {
|
||||||
"__API_URL__": JSON.stringify("http://localhost:3000"),
|
"__API_URL__": JSON.stringify("http://localhost:3000"),
|
||||||
};
|
};
|
||||||
|
} else if (mode === 'embedded') {
|
||||||
|
ret.define = {
|
||||||
|
"__API_URL__": JSON.stringify("/"),
|
||||||
|
};
|
||||||
} else {
|
} else {
|
||||||
ret.define = {
|
ret.define = {
|
||||||
"__API_URL__": JSON.stringify("http://localhost:3000"),
|
"__API_URL__": JSON.stringify("http://localhost:3000"),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue