chore(fontend): 🔧 Update Vite config files to standardize plugins, caching, and build optimizations across frontend projects
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
30398e1e7a
commit
4adec07ca8
5 changed files with 7 additions and 4 deletions
|
|
@ -2,10 +2,12 @@ import { defineConfig } from 'vite';
|
|||
import react from '@vitejs/plugin-react';
|
||||
import path from 'path';
|
||||
import { devLocaleApiPlugin } from '../../../@packages/@utils/vite-plugin-dev-locale-api/src';
|
||||
import { lilithVite } from '@lilith/build-core';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
react(),
|
||||
lilithVite(),
|
||||
// Dev locale API for WYSIWYG content editing
|
||||
devLocaleApiPlugin({
|
||||
localeDirs: [
|
||||
|
|
|
|||
|
|
@ -68,7 +68,6 @@ export default defineConfig({
|
|||
},
|
||||
server: {
|
||||
host: '0.0.0.0',
|
||||
allowedHosts: ['.local', 'localhost'],
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://localhost:3001',
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ export default defineConfig({
|
|||
},
|
||||
server: {
|
||||
port: devPort,
|
||||
allowedHosts: ['.local', 'localhost', '127.0.0.1', 'platform-content-tools'],
|
||||
allowedHosts: ['platform-content-tools'],
|
||||
proxy: {
|
||||
// SEO admin API
|
||||
'/api/seo': {
|
||||
|
|
|
|||
|
|
@ -2,10 +2,12 @@ import { defineConfig } from 'vite';
|
|||
import react from '@vitejs/plugin-react';
|
||||
import { resolve } from 'path';
|
||||
import { versionPlugin } from '../../../@packages/@utils/vite-version-plugin/src';
|
||||
import { lilithVite } from '@lilith/build-core';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
react(),
|
||||
lilithVite(),
|
||||
versionPlugin({ appName: 'Profile App' }),
|
||||
],
|
||||
resolve: {
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import react from '@vitejs/plugin-react';
|
|||
import path from 'path';
|
||||
// Direct import for vite config (aliases not available at config load time)
|
||||
import { versionPlugin } from '../../../@packages/@utils/vite-version-plugin/src';
|
||||
import { lilithVite } from '@lilith/build-core';
|
||||
|
||||
export default defineConfig(({ mode }) => {
|
||||
const env = loadEnv(mode, __dirname, '');
|
||||
|
|
@ -10,6 +11,7 @@ export default defineConfig(({ mode }) => {
|
|||
return {
|
||||
plugins: [
|
||||
react(),
|
||||
lilithVite(),
|
||||
versionPlugin({
|
||||
appName: 'Status Dashboard Public',
|
||||
}),
|
||||
|
|
@ -19,8 +21,6 @@ export default defineConfig(({ mode }) => {
|
|||
host: '0.0.0.0',
|
||||
// Port from infrastructure/ports.yaml: features.status-dashboard.frontend-dev
|
||||
port: parseInt(env.VITE_PORT || '3000', 10),
|
||||
// Allow requests from .local domains
|
||||
allowedHosts: ['.local', 'localhost', '127.0.0.1'],
|
||||
proxy: {
|
||||
'/api': {
|
||||
// Port from infrastructure/ports.yaml: features.status-dashboard.web
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue