mirror of
https://github.com/immich-app/immich.git
synced 2025-12-28 01:11:47 +03:00
feat(web): use wasm for justified layout calculation (#15524)
* working * use wrapper class * update import * simplify * it works without changing `optimizeDeps` * inline layout options * update gallery view * use es2022 * fix import * fix vitest * empty geometry * bump version * Update web/src/lib/stores/assets.store.ts Co-authored-by: Jason Rasmussen <jason@rasm.me> * fix: typo --------- Co-authored-by: Jason Rasmussen <jason@rasm.me> Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
@@ -4,6 +4,7 @@ import { svelteTesting } from '@testing-library/svelte/vite';
|
||||
import path from 'node:path';
|
||||
import { visualizer } from 'rollup-plugin-visualizer';
|
||||
import { defineConfig } from 'vite';
|
||||
import wasm from 'vite-plugin-wasm';
|
||||
|
||||
const upstream = {
|
||||
target: process.env.IMMICH_SERVER_URL || 'http://immich-server:2283/',
|
||||
@@ -14,6 +15,9 @@ const upstream = {
|
||||
};
|
||||
|
||||
export default defineConfig({
|
||||
build: {
|
||||
target: 'es2022',
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
'xmlhttprequest-ssl': './node_modules/engine.io-client/lib/xmlhttprequest.js',
|
||||
@@ -40,6 +44,7 @@ export default defineConfig({
|
||||
: undefined,
|
||||
enhancedImages(),
|
||||
svelteTesting(),
|
||||
wasm(),
|
||||
],
|
||||
optimizeDeps: {
|
||||
entries: ['src/**/*.{svelte,ts,html}'],
|
||||
@@ -52,5 +57,9 @@ export default defineConfig({
|
||||
sequence: {
|
||||
hooks: 'list',
|
||||
},
|
||||
deps: {
|
||||
// workaround for https://github.com/vitest-dev/vitest/issues/2150
|
||||
inline: ['@immich/justified-layout-wasm'],
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user