fix: restore post-v1.1.14 features while preserving asset updates
ci/woodpecker/push/woodpecker Pipeline was successful

Undo the full-tree rollback in 6ea1b3d and restore the pre-rollback v1.2.0 code. Preserve the new asset flow rules, abnormal inventory separation, range drilldowns and date picker; adapt the regression test to the restored routes layout.
This commit is contained in:
shishengliang
2026-09-16 10:48:32 +08:00
parent 17b084ce62
commit c2f21a3a8a
211 changed files with 36165 additions and 4434 deletions
+29 -9
View File
@@ -1,15 +1,35 @@
import { defineConfig } from 'vite';
import { defineConfig, loadEnv } 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({
plugins: [react(), tailwindcss()],
server: {
proxy: {
'/api': {
target: 'http://localhost:3001',
changeOrigin: true,
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');
}
});
},
},
},
},
},
};
});