Setup enviroment stuff.
This commit is contained in:
1
frontend/.env.dev
Normal file
1
frontend/.env.dev
Normal file
@@ -0,0 +1 @@
|
|||||||
|
VITE_API_TARGET=ASDF
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
"name": "rushstats",
|
"name": "rushstats",
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "cross-env NODE_OPTIONS='--no-warnings' vite",
|
"dev": "cross-env NODE_OPTIONS='--no-warnings' vite --mode dev",
|
||||||
"build": "vue-tsc --noEmit && vite build",
|
"build": "vue-tsc --noEmit && vite build",
|
||||||
"preview": "vite preview",
|
"preview": "vite preview",
|
||||||
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
|
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-container><div>potato</div></v-container>
|
<v-container><div>potato</div><div>asdf{{potato}}{{butts}}</div></v-container>
|
||||||
<v-table>
|
<v-table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -20,5 +20,10 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { Game, useGameStore } from '../store/gamestore'
|
import { Game, useGameStore } from '../store/gamestore'
|
||||||
|
|
||||||
|
const potato = import.meta.env
|
||||||
|
// const butts = import.meta.env.dev
|
||||||
|
const butts = import.meta.env.VITE_API_TARGET
|
||||||
const games = useGameStore()
|
const games = useGameStore()
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -8,11 +8,13 @@ import VueRouter from 'unplugin-vue-router/vite'
|
|||||||
import Vuetify, { transformAssetUrls } from 'vite-plugin-vuetify'
|
import Vuetify, { transformAssetUrls } from 'vite-plugin-vuetify'
|
||||||
|
|
||||||
// Utilities
|
// Utilities
|
||||||
import { defineConfig } from 'vite'
|
import { defineConfig, loadEnv } from 'vite'
|
||||||
import { fileURLToPath, URL } from 'node:url'
|
import { fileURLToPath, URL } from 'node:url'
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig({
|
export default ({mode}) => {
|
||||||
|
process.env = {...process.env, ...loadEnv(mode, process.cwd())}
|
||||||
|
return defineConfig({
|
||||||
plugins: [
|
plugins: [
|
||||||
VueRouter(),
|
VueRouter(),
|
||||||
Layouts(),
|
Layouts(),
|
||||||
@@ -65,4 +67,4 @@ export default defineConfig({
|
|||||||
server: {
|
server: {
|
||||||
port: 3000,
|
port: 3000,
|
||||||
},
|
},
|
||||||
})
|
})}
|
||||||
|
|||||||
Reference in New Issue
Block a user