fix: ⚡ add api url configurable
This commit is contained in:
parent
44dfe145ed
commit
962067e824
@ -1,6 +1,7 @@
|
||||
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'
|
||||
import pluginVue from 'eslint-plugin-vue'
|
||||
import vueTsEslintConfig from '@vue/eslint-config-typescript'
|
||||
import skipFormatting from '@vue/eslint-config-prettier/skip-formatting'
|
||||
import vueTsEslintConfig from '@vue/eslint-config-typescript'
|
||||
|
||||
export default [
|
||||
{
|
||||
@ -16,10 +17,12 @@ export default [
|
||||
...pluginVue.configs['flat/recommended'],
|
||||
...vueTsEslintConfig(),
|
||||
skipFormatting,
|
||||
eslintPluginPrettierRecommended,
|
||||
|
||||
{
|
||||
rules: {
|
||||
'sort-imports': 'error',
|
||||
'vue/multi-word-component-names': 'off',
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
]
|
||||
|
@ -7,7 +7,7 @@ import { RouterView } from 'vue-router'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
RouterView
|
||||
}
|
||||
RouterView,
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
@ -1,7 +1,10 @@
|
||||
import { createApp } from 'vue'
|
||||
import App from './App.vue'
|
||||
import { createApp } from 'vue'
|
||||
import router from './router'
|
||||
|
||||
const app = createApp(App)
|
||||
app.config.globalProperties.$api = import.meta.env.PROD
|
||||
? `${import.meta.env.BASE_URL}api`
|
||||
: `http://localhost:${import.meta.env.API_PORT ?? 5000}/api`
|
||||
app.use(router)
|
||||
app.mount('#app')
|
||||
|
@ -7,9 +7,9 @@ const router = createRouter({
|
||||
{
|
||||
path: '/',
|
||||
name: 'home',
|
||||
component: Containers
|
||||
component: Containers,
|
||||
},
|
||||
]
|
||||
],
|
||||
})
|
||||
|
||||
export default router
|
||||
|
@ -4,6 +4,6 @@
|
||||
|
||||
<script lang="ts">
|
||||
export default {
|
||||
name: 'Containers'
|
||||
name: 'Containers',
|
||||
}
|
||||
</script>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<link rel="icon" href="/favicon.ico">
|
||||
<link rel="icon" href="/frontend/assets/favicon.ico">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Pilotwings</title>
|
||||
</head>
|
||||
|
@ -1,19 +1,17 @@
|
||||
import { fileURLToPath, URL } from 'node:url'
|
||||
import { URL, fileURLToPath } from 'node:url'
|
||||
|
||||
import { defineConfig } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
|
||||
// https://vite.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
vue(),
|
||||
],
|
||||
plugins: [vue()],
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': fileURLToPath(new URL('./frontend', import.meta.url))
|
||||
}
|
||||
'@': fileURLToPath(new URL('./frontend', import.meta.url)),
|
||||
},
|
||||
},
|
||||
build: {
|
||||
outDir: 'backend/dist'
|
||||
outDir: 'backend/dist',
|
||||
},
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user