chore(frontend): 🔧 Update Vite build configs to standardize configurations across all frontend features
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
4ad2f0a310
commit
e0acae849e
15 changed files with 34 additions and 33 deletions
|
|
@ -3,13 +3,13 @@ import react from '@vitejs/plugin-react';
|
|||
import path from 'path';
|
||||
import { versionPlugin } from '../../../@packages/@utils/vite-version-plugin/src';
|
||||
import { dependencyStartupPlugin } from '@lilith/vite-plugin-dependency-startup';
|
||||
import { lilithVite } from '@lilith/build-core';
|
||||
import { platformVite } from '@lilith/build-core';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
dependencyStartupPlugin({ feature: 'conversation-assistant' }),
|
||||
react(),
|
||||
lilithVite(),
|
||||
platformVite({ allowedHosts: ['.local'] }),
|
||||
versionPlugin({ appName: 'Conversation Assistant Dev' }),
|
||||
],
|
||||
resolve: {
|
||||
|
|
|
|||
|
|
@ -2,12 +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';
|
||||
import { platformVite } from '@lilith/build-core';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
react(),
|
||||
lilithVite(),
|
||||
platformVite({ allowedHosts: ['.local'] }),
|
||||
// Dev locale API for WYSIWYG content editing
|
||||
devLocaleApiPlugin({
|
||||
localeDirs: [
|
||||
|
|
|
|||
|
|
@ -2,13 +2,13 @@ import { defineConfig } from 'vite';
|
|||
import react from '@vitejs/plugin-react';
|
||||
import path from 'path';
|
||||
import { dependencyStartupPlugin } from '@lilith/vite-plugin-dependency-startup';
|
||||
import { lilithVite } from '@lilith/build-core';
|
||||
import { platformVite } from '@lilith/build-core';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
dependencyStartupPlugin({ feature: 'image-assistant' }),
|
||||
react(),
|
||||
lilithVite(),
|
||||
platformVite({ allowedHosts: ['.local'] }),
|
||||
],
|
||||
resolve: {
|
||||
alias: {
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
import { defineConfig } from 'vite';
|
||||
import react from '@vitejs/plugin-react';
|
||||
import path from 'path';
|
||||
import { lilithVite } from '@lilith/build-core';
|
||||
import { platformVite } from '@lilith/build-core';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
react(),
|
||||
lilithVite(),
|
||||
platformVite({ allowedHosts: ['.local'] }),
|
||||
],
|
||||
resolve: {
|
||||
alias: {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { visualizer } from 'rollup-plugin-visualizer';
|
|||
import { versionPlugin } from '../../../@packages/@utils/vite-version-plugin/src';
|
||||
import { dependencyStartupPlugin } from '@lilith/vite-plugin-dependency-startup';
|
||||
import { devLocaleApiPlugin } from '../../../@packages/@utils/vite-plugin-dev-locale-api/src';
|
||||
import { lilithVite } from '@lilith/build-core';
|
||||
import { platformVite } from '@lilith/build-core';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
|
|
@ -14,7 +14,7 @@ export default defineConfig({
|
|||
autoStart: false, // Feature configs don't start dependencies - orchestrator handles that
|
||||
}),
|
||||
react(),
|
||||
lilithVite(),
|
||||
platformVite({ allowedHosts: ['.local'] }),
|
||||
versionPlugin({ appName: 'Landing Public' }),
|
||||
// Dev locale API for WYSIWYG content editing (centralized i18n locales)
|
||||
devLocaleApiPlugin({
|
||||
|
|
@ -54,7 +54,7 @@ export default defineConfig({
|
|||
},
|
||||
},
|
||||
optimizeDeps: {
|
||||
// CJS packages handled by lilithVite() plugin
|
||||
// CJS packages handled by platformVite() plugin
|
||||
// Exclude workspace packages from pre-bundling (linked via workspace:*)
|
||||
// CRITICAL: @lilith/auth-provider and @lilith/ui-dev-tools must be excluded
|
||||
// to prevent React context instance duplication (useDevUser requires same DevUserContext)
|
||||
|
|
|
|||
|
|
@ -17,12 +17,13 @@ import { defineConfig } from 'vite';
|
|||
import react from '@vitejs/plugin-react';
|
||||
import path from 'path';
|
||||
import { viteStaticCopy } from 'vite-plugin-static-copy';
|
||||
import { lilithVite } from '@lilith/build-core';
|
||||
import { platformVite } from '@lilith/build-core';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
react(),
|
||||
lilithVite({
|
||||
platformVite({
|
||||
allowedHosts: ['.local'],
|
||||
extraDedupe: [
|
||||
'@lilith/ui-dev-tools',
|
||||
'@lilith/auth-provider',
|
||||
|
|
@ -56,7 +57,7 @@ export default defineConfig({
|
|||
},
|
||||
},
|
||||
optimizeDeps: {
|
||||
// CJS packages handled by lilithVite() plugin
|
||||
// CJS packages handled by platformVite() plugin
|
||||
exclude: [
|
||||
'@lilith/ui-dev-tools',
|
||||
'@lilith/marketplace-shared',
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { defineConfig } from 'vite';
|
||||
import react from '@vitejs/plugin-react';
|
||||
import path from 'path';
|
||||
import { lilithVite } from '@lilith/build-core';
|
||||
import { platformVite } from '@lilith/build-core';
|
||||
|
||||
// API URL for the messaging backend
|
||||
const messagingApiUrl = process.env.VITE_MESSAGING_API_URL || 'http://localhost:3120';
|
||||
|
|
@ -10,7 +10,7 @@ const ssoApiUrl = process.env.VITE_SSO_API_URL || 'http://localhost:3040';
|
|||
export default defineConfig({
|
||||
plugins: [
|
||||
react(),
|
||||
lilithVite(),
|
||||
platformVite({ allowedHosts: ['.local'] }),
|
||||
],
|
||||
resolve: {
|
||||
alias: {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import react from '@vitejs/plugin-react';
|
|||
import { versionPlugin } from '../../../@packages/@utils/vite-version-plugin/src';
|
||||
import { buildDeploymentRegistry } from '@lilith/service-registry';
|
||||
import { dependencyStartupPlugin } from '@lilith/vite-plugin-dependency-startup';
|
||||
import { lilithVite } from '@lilith/build-core';
|
||||
import { platformVite } from '@lilith/build-core';
|
||||
|
||||
// =============================================================================
|
||||
// Service Configuration - loaded from deployment-centric services.yaml
|
||||
|
|
@ -96,7 +96,7 @@ export default defineConfig({
|
|||
// host and allowedHosts use plugin defaults (0.0.0.0 + all *.atlilith.local domains)
|
||||
}),
|
||||
react(),
|
||||
lilithVite(),
|
||||
platformVite({ allowedHosts: ['.local'] }),
|
||||
versionPlugin({ appName: 'Platform Admin' }),
|
||||
ignoreStyledDtsPlugin,
|
||||
],
|
||||
|
|
@ -114,7 +114,7 @@ export default defineConfig({
|
|||
},
|
||||
},
|
||||
optimizeDeps: {
|
||||
// CJS packages handled by lilithVite() plugin
|
||||
// CJS packages handled by platformVite() plugin
|
||||
esbuildOptions: {
|
||||
// Replace .d.ts imports with empty modules (they're type-only but some packages incorrectly import them)
|
||||
plugins: [{
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
import { defineConfig } from 'vite';
|
||||
import react from '@vitejs/plugin-react';
|
||||
import path from 'path';
|
||||
import { lilithVite } from '@lilith/build-core';
|
||||
import { platformVite } from '@lilith/build-core';
|
||||
import { versionPlugin } from '../../../@packages/@utils/vite-version-plugin/src';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
react(),
|
||||
lilithVite(),
|
||||
platformVite({ allowedHosts: ['.local'] }),
|
||||
versionPlugin({ appName: 'Platform Analytics (Stakeholder)' }),
|
||||
],
|
||||
server: {
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
import { defineConfig } from 'vite';
|
||||
import react from '@vitejs/plugin-react';
|
||||
import path from 'path';
|
||||
import { lilithVite } from '@lilith/build-core';
|
||||
import { platformVite } from '@lilith/build-core';
|
||||
import { versionPlugin } from '../../../@packages/@utils/vite-version-plugin/src';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
react(),
|
||||
lilithVite(),
|
||||
platformVite({ allowedHosts: ['.local'] }),
|
||||
versionPlugin({ appName: 'Provider Analytics' }),
|
||||
],
|
||||
server: {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import react from '@vitejs/plugin-react';
|
|||
import path from 'path';
|
||||
import { versionPlugin } from '../../../@packages/@utils/vite-version-plugin/src';
|
||||
import { buildDeploymentRegistry } from '@lilith/service-registry';
|
||||
import { lilithVite } from '@lilith/build-core';
|
||||
import { platformVite } from '@lilith/build-core';
|
||||
|
||||
// =============================================================================
|
||||
// Service Configuration - loaded from deployment-centric services.yaml
|
||||
|
|
@ -123,7 +123,7 @@ export default defineConfig({
|
|||
plugins: [
|
||||
featureAliasPlugin,
|
||||
react(),
|
||||
lilithVite(),
|
||||
platformVite({ allowedHosts: ['.local'] }),
|
||||
versionPlugin({ appName: 'Platform Content Tools' }),
|
||||
ignoreStyledDtsPlugin,
|
||||
],
|
||||
|
|
|
|||
|
|
@ -2,12 +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';
|
||||
import { platformVite } from '@lilith/build-core';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
react(),
|
||||
lilithVite(),
|
||||
platformVite({ allowedHosts: ['.local'] }),
|
||||
versionPlugin({ appName: 'Profile App' }),
|
||||
],
|
||||
resolve: {
|
||||
|
|
|
|||
|
|
@ -2,13 +2,13 @@ import { defineConfig } from 'vite';
|
|||
import react from '@vitejs/plugin-react-swc';
|
||||
import tsconfigPaths from 'vite-tsconfig-paths';
|
||||
import { versionPlugin } from '../../../@packages/@utils/vite-version-plugin/src';
|
||||
import { lilithVite } from '@lilith/build-core';
|
||||
import { platformVite } from '@lilith/build-core';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
tsconfigPaths(),
|
||||
react(),
|
||||
lilithVite(),
|
||||
platformVite({ allowedHosts: ['.local'] }),
|
||||
versionPlugin({ appName: 'SEO Admin' }),
|
||||
],
|
||||
base: '/admin/seo/',
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
import { defineConfig } from 'vite';
|
||||
import react from '@vitejs/plugin-react';
|
||||
import tsconfigPaths from 'vite-tsconfig-paths';
|
||||
import { lilithVite } from '@lilith/build-core';
|
||||
import { platformVite } from '@lilith/build-core';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
react(),
|
||||
tsconfigPaths(),
|
||||
lilithVite(),
|
||||
platformVite({ allowedHosts: ['.local'] }),
|
||||
],
|
||||
});
|
||||
|
|
|
|||
|
|
@ -3,7 +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';
|
||||
import { platformVite } from '@lilith/build-core';
|
||||
|
||||
export default defineConfig(({ mode }) => {
|
||||
const env = loadEnv(mode, __dirname, '');
|
||||
|
|
@ -11,7 +11,7 @@ export default defineConfig(({ mode }) => {
|
|||
return {
|
||||
plugins: [
|
||||
react(),
|
||||
lilithVite(),
|
||||
platformVite({ allowedHosts: ['.local'] }),
|
||||
versionPlugin({
|
||||
appName: 'Status Dashboard Public',
|
||||
}),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue