Compare commits

...

2 Commits

Author SHA1 Message Date
6f5d188017 - fix style for source code 2023-08-07 10:23:31 +02:00
b05378ea2e - update port for developmnet mode 2023-08-07 10:23:30 +02:00
3 changed files with 26 additions and 13 deletions

View File

@@ -1,4 +1,5 @@
VITE_APP_NAME="Kamil Niemczycki CV"
VITE_CV_URL="http://localhost:5173"
VITE_PORT=5173
VITE_API_URL="http://localhost"
VITE_SOURCE_CODE="https://github.com/kamilniemczycki"

View File

@@ -59,11 +59,11 @@ const qrCodeLink = computed(() => {
<Skills />
<Certificates />
<Links class="pb-8 md:pb-0" />
<div class="hidden print:block print:absolute bottom-7 right-0 w-full">
<div class="hidden print:block print:absolute bottom-9 right-0 w-full">
<a :href="qrCodeLink" title="Link do CV w wersji przeglądarkowej" target="_blink">
<QRCode
render-as="svg"
class="mx-auto mb-2"
class="mx-auto mb-1"
:value="qrCodeLink"
:size="100"
level="L"
@@ -71,7 +71,7 @@ const qrCodeLink = computed(() => {
</a>
<div class="text-center">CV w wersji online</div>
</div>
<div class="absolute bottom-1.5 right-0 w-full px-5 text-right md:text-center text-xs">
<div class="absolute bottom-1.5 right-0 w-full px-5 text-center text-xs">
<a :href="sourceCode" target="_blank"><FontAwesomeIcon class="mr-1" :icon="['fab', 'github']"/>Kod źródłowy CV</a>
</div>
</div>

View File

@@ -1,8 +1,19 @@
import { defineConfig, splitVendorChunkPlugin } from 'vite'
import vue from '@vitejs/plugin-vue'
import { defineConfig, loadEnv, splitVendorChunkPlugin } from 'vite';
import vue from '@vitejs/plugin-vue';
import { networkInterfaces } from 'os';
// https://vitejs.dev/config/
export default defineConfig({
export default defineConfig((mode) => {
const env = loadEnv(mode, process.cwd(), "");
return {
server: {
//host: Object.values(networkInterfaces()).flat().find(i => i.family === 'IPv4' && !i.internal).address,
host: 'localhost',
port: parseInt(env.VITE_PORT ?? 5173),
hmr: {
host: 'localhost',
},
},
plugins: [ vue(), splitVendorChunkPlugin() ],
resolve: {
vue: 'vue/dist/vue.esm-bundler.js',
@@ -10,4 +21,5 @@ export default defineConfig({
build: {
chunkSizeWarningLimit: 2048,
},
};
});