diff --git a/frontend/package-lock.json b/frontend/package-lock.json index b6f1a8f1..178f551b 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,11 +1,11 @@ { - "name": "milligram-frontend", + "name": "checkgram-frontend", "version": "0.1.0", "lockfileVersion": 2, "requires": true, "packages": { "": { - "name": "milligram-frontend", + "name": "checkgram-frontend", "version": "0.1.0", "dependencies": { "@azure/cognitiveservices-computervision": "^8.2.0", diff --git a/frontend/package.json b/frontend/package.json index 258fd406..86bf06dc 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,9 +1,9 @@ { - "name": "milligram-frontend", + "name": "checkgram-frontend", "version": "0.1.0", "private": true, "scripts": { - "dev": "vite", + "dev": "vite --host 0.0.0.0 --port 5173", "build": "vite build", "serve": "vite preview", "lint": "eslint --ext .js,.vue,.tx --ignore-path .gitignore --fix src" diff --git a/frontend/src/views/Home.vue b/frontend/src/views/Home.vue index 16cd3818..6aaf3df6 100644 --- a/frontend/src/views/Home.vue +++ b/frontend/src/views/Home.vue @@ -6,8 +6,8 @@
- - Milligram + + checkgram diff --git a/frontend/vite.config.js b/frontend/vite.config.js index 0385a686..8ace6c4d 100644 --- a/frontend/vite.config.js +++ b/frontend/vite.config.js @@ -4,9 +4,24 @@ import { defineConfig } from "vite"; import { createVuePlugin as vue } from "vite-plugin-vue2"; const path = require("path"); +const codespaceName = process.env['CODESPACE_NAME']; +const codespaceDomain = process.env['GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN']; +const hmrPort = 5173; + +const hmrRemoteHost = codespaceName ? `${codespaceName}-${hmrPort}.${codespaceDomain}` : 'localhost'; +const hmrRemotePort = codespaceName ? 443 : hmrPort; +const hmrRemoteProtocol = codespaceName ? 'wss' : 'ws'; // https://vitejs.dev/config/ export default defineConfig({ + server: { + hmr: { + protocol: hmrRemoteProtocol, + host: hmrRemoteHost, + port: hmrPort, + clientPort: hmrRemotePort + } + }, plugins: [vue()], resolve: { alias: {