You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
orario/vite.config.js

22 lines
506 B
JavaScript

import { defineConfig } from 'vite'
import preact from '@preact/preset-vite'
import { loadEnv } from 'vite'
export default defineConfig(({ mode }) => {
console.log(`Build Mode: "${mode}"`)
const env = loadEnv(mode, process.cwd(), '')
return {
base: mode === 'development' ? '/' : env.BASE_URL,
server: {
port: 3000,
},
plugins: [preact()],
esbuild: {
logOverride: { 'this-is-undefined-in-esm': 'silent' },
},
}
})