Initial commit
This commit is contained in:
37
vite.config.ts
Normal file
37
vite.config.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
import tailwindcss from '@tailwindcss/vite';
|
||||
import react from '@vitejs/plugin-react';
|
||||
import path from 'node:path';
|
||||
import { defineConfig } from 'vite';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [react(), tailwindcss()],
|
||||
/**
|
||||
* A build stamp, shown at the foot of the account menu.
|
||||
*
|
||||
* This exists because of a real and expensive failure: work was verified here,
|
||||
* reported as done, and looked at on a machine running an older copy — twice,
|
||||
* over four days, with no way for either side to tell. A dev server and a
|
||||
* stale folder are indistinguishable from the screen. Now they are not.
|
||||
*/
|
||||
define: {
|
||||
__BUILD_STAMP__: JSON.stringify(
|
||||
new Date().toISOString().replace('T', ' ').slice(0, 16).concat(' UTC'),
|
||||
),
|
||||
},
|
||||
resolve: { alias: { '@': path.resolve(import.meta.dirname, './src') } },
|
||||
server: {
|
||||
// 3100, not 3000: the OLD console (daily_merchant_web) runs its dev server
|
||||
// on 3000. Sharing a port means whichever starts first wins it, and you end
|
||||
// up looking at the wrong app while wondering why nothing changed.
|
||||
port: 3100,
|
||||
strictPort: true,
|
||||
proxy: {
|
||||
'/fiesta': {
|
||||
target: 'https://fiesta.nearle.app',
|
||||
changeOrigin: true,
|
||||
secure: true,
|
||||
rewrite: (p) => p.replace(/^\/fiesta/, ''),
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user