mirror of
https://github.com/k1tbyte/Wand-Enhancer.git
synced 2026-08-28 22:01:17 +00:00
a0b3968d33
Reorganize the panel around product capabilities and integrate the remote i18n feature from origin/master into the new structure. - Restructure src into capability features (app, trainer, library, remote-session, appearance, shared); move the bridge to bridge/src. - Add lingui-based UI localization and wrap remaining user-facing strings (Trans / msg macros); fix the 'END В·' mojibake. - Port WeMod cheat-metadata i18n: capture the access token from the snapshot's renderer in the bridge and fetch localized trainer_meta in remote-session.i18n; guarantee snapshot sync on token failure. - Wire vitest to the app's lingui/preact pipeline (mergeConfig).
40 lines
1.1 KiB
TypeScript
Vendored
40 lines
1.1 KiB
TypeScript
Vendored
import { defineConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
import tailwindcss from '@tailwindcss/vite';
|
|
import { lingui } from '@lingui/vite-plugin';
|
|
import { fileURLToPath, URL } from 'node:url';
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
react({ babel: { plugins: ['@lingui/babel-plugin-lingui-macro'] } }),
|
|
lingui(),
|
|
tailwindcss(),
|
|
],
|
|
base: './',
|
|
resolve: {
|
|
alias: [
|
|
{ find: '@', replacement: fileURLToPath(new URL('./src', import.meta.url)) },
|
|
{ find: 'react-dom/client', replacement: 'preact/compat/client' },
|
|
{ find: 'react-dom', replacement: 'preact/compat' },
|
|
{ find: 'react/jsx-runtime', replacement: 'preact/jsx-runtime' },
|
|
{ find: 'react/jsx-dev-runtime', replacement: 'preact/jsx-dev-runtime' },
|
|
{ find: 'react', replacement: 'preact/compat' },
|
|
],
|
|
},
|
|
server: {
|
|
host: '127.0.0.1',
|
|
port: 4173,
|
|
strictPort: true,
|
|
},
|
|
preview: {
|
|
host: '127.0.0.1',
|
|
port: 4173,
|
|
strictPort: true,
|
|
},
|
|
build: {
|
|
outDir: 'dist',
|
|
assetsDir: 'assets',
|
|
target: 'es2020',
|
|
sourcemap: false,
|
|
},
|
|
}); |