revert: restore v1.1.14 (37a9f303)
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
shishengliang
2026-09-16 09:29:30 +08:00
parent c49a02e3d9
commit 6ea1b3d5dd
210 changed files with 4448 additions and 36179 deletions
+9 -29
View File
@@ -1,35 +1,15 @@
import { defineConfig, loadEnv } from 'vite';
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import tailwindcss from '@tailwindcss/vite';
import { energyDevMockApi } from './src/modules/energy/hydrogen/dev-mock-api';
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), '');
return {
plugins: [
react(),
tailwindcss(),
...(env.DEV_MOCK_API === '1' ? [energyDevMockApi()] : []),
],
server: {
allowedHosts: ['biz.u2145933.nyat.app'],
proxy: {
'/api': {
target: 'http://localhost:3001',
changeOrigin: true,
configure(proxy) {
// A failed upstream BI aggregation must become an HTTP error for
// the UI fallback, never terminate the 8115 preview process.
proxy.on('error', (_error, _request, response) => {
if (response && 'writeHead' in response && !response.headersSent) {
response.writeHead(502, { 'Content-Type': 'text/plain; charset=utf-8' });
response.end('Upstream API temporarily unavailable');
}
});
},
},
export default defineConfig({
plugins: [react(), tailwindcss()],
server: {
proxy: {
'/api': {
target: 'http://localhost:3001',
changeOrigin: true,
},
},
};
},
});