disable overlay

This commit is contained in:
Andreani Jean
2023-05-09 16:12:40 +02:00
parent 4a38fcb239
commit 8f11742b11
3 changed files with 23 additions and 30 deletions

1
.env.d.ts vendored
View File

@@ -1,6 +1,5 @@
interface ImportMetaEnv {
VITE_API_URL?: string
VITE_NODE_ENV?: string
}
interface ImportMeta {

View File

@@ -1,4 +1,3 @@
VITE_API_URL=https://my-instance.com
VITE_NODE_ENV=production
NPM_CONFIG_PRODUCTION=false
YARN_PRODUCTION=false

View File

@@ -4,18 +4,14 @@ import vue from '@vitejs/plugin-vue'
import eslintPlugin from 'vite-plugin-eslint'
// https://vitejs.dev/config/
export default ({ mode }: { mode: any }) => {
process.env = { ...process.env, ...loadEnv(mode, process.cwd()) }
return defineConfig({
defineConfig({
server: {
host: true,
port: 5173,
hmr:
process.env.VITE_NODE_ENV === 'development'
? {
port: 9000
hmr: {
port: 9000,
overlay: false
}
: false
},
base: '/',
plugins: [vue(), eslintPlugin()],
@@ -33,4 +29,3 @@ export default ({ mode }: { mode: any }) => {
}
}
})
}