mirror of
				https://github.com/immich-app/immich.git
				synced 2025-11-03 19:17:11 -05:00 
			
		
		
		
	* Work in progress - super quick asset store->state * bugfix: deep linking to timeline, on scrub stop * format, remove stale * disable test, todo: fix test * remove unused import * Fix merge * lint * lint * lint * Default to non-wasm layout * lint * intobs fix * fix rejected promise * Review comments, static import wasm * Back to dynamic * try top-level-await * back to the first solution, with more finesse * comment out wasm for now * back out the wasm/thumbhash/thumbnail changes * lint * Fully remove wasm * lockfile --------- Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
		
			
				
	
	
		
			61 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			61 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
import { enhancedImages } from '@sveltejs/enhanced-img';
 | 
						|
import { sveltekit } from '@sveltejs/kit/vite';
 | 
						|
import { svelteTesting } from '@testing-library/svelte/vite';
 | 
						|
import path from 'node:path';
 | 
						|
import { visualizer } from 'rollup-plugin-visualizer';
 | 
						|
import { defineConfig } from 'vite';
 | 
						|
 | 
						|
const upstream = {
 | 
						|
  target: process.env.IMMICH_SERVER_URL || 'http://immich-server:2283/',
 | 
						|
  secure: true,
 | 
						|
  changeOrigin: true,
 | 
						|
  logLevel: 'info',
 | 
						|
  ws: true,
 | 
						|
};
 | 
						|
 | 
						|
export default defineConfig({
 | 
						|
  build: {
 | 
						|
    target: 'es2022',
 | 
						|
  },
 | 
						|
  resolve: {
 | 
						|
    alias: {
 | 
						|
      'xmlhttprequest-ssl': './node_modules/engine.io-client/lib/xmlhttprequest.js',
 | 
						|
      // eslint-disable-next-line unicorn/prefer-module
 | 
						|
      '@test-data': path.resolve(__dirname, './src/test-data'),
 | 
						|
      // '@immich/ui': path.resolve(__dirname, '../../ui'),
 | 
						|
    },
 | 
						|
  },
 | 
						|
  server: {
 | 
						|
    // connect to a remote backend during web-only development
 | 
						|
    proxy: {
 | 
						|
      '/api': upstream,
 | 
						|
      '/.well-known/immich': upstream,
 | 
						|
      '/custom.css': upstream,
 | 
						|
    },
 | 
						|
    allowedHosts: true,
 | 
						|
  },
 | 
						|
  plugins: [
 | 
						|
    sveltekit(),
 | 
						|
    process.env.BUILD_STATS === 'true'
 | 
						|
      ? visualizer({
 | 
						|
          emitFile: true,
 | 
						|
          filename: 'stats.html',
 | 
						|
        })
 | 
						|
      : undefined,
 | 
						|
    enhancedImages(),
 | 
						|
    svelteTesting(),
 | 
						|
  ],
 | 
						|
  optimizeDeps: {
 | 
						|
    entries: ['src/**/*.{svelte,ts,html}'],
 | 
						|
  },
 | 
						|
  test: {
 | 
						|
    include: ['src/**/*.{test,spec}.{js,ts}'],
 | 
						|
    globals: true,
 | 
						|
    environment: 'jsdom',
 | 
						|
    setupFiles: ['./src/test-data/setup.ts'],
 | 
						|
    sequence: {
 | 
						|
      hooks: 'list',
 | 
						|
    },
 | 
						|
  },
 | 
						|
});
 |