#2 fix(Environment): move django url to vite.config.mjs
This commit is contained in:
parent
d50ff7e1e7
commit
2e4aef00c4
@ -1,6 +1,6 @@
|
|||||||
class DjangoApi {
|
class DjangoApi {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.base = 'http://localhost:7000';
|
this.base = process.env.DJANGO_BASE_URL;
|
||||||
}
|
}
|
||||||
|
|
||||||
getCustomers() {
|
getCustomers() {
|
||||||
|
@ -46,7 +46,10 @@ export default defineConfig({
|
|||||||
vueTemplate: true,
|
vueTemplate: true,
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
define: { 'process.env': {API_IMPLEMENTATION: 'django'} },
|
define: { 'process.env': {
|
||||||
|
API_IMPLEMENTATION: 'django',
|
||||||
|
DJANGO_BASE_URL: 'http://localhost:7000'
|
||||||
|
} },
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
'@': fileURLToPath(new URL('./src', import.meta.url))
|
'@': fileURLToPath(new URL('./src', import.meta.url))
|
||||||
|
Loading…
Reference in New Issue
Block a user