fix: barcode scanner WASM loading and Android camera permission
All checks were successful
CI / update (push) Successful in 1m5s
All checks were successful
CI / update (push) Successful in 1m5s
- Exclude barcode-detector from Vite optimizeDeps to prevent WASM mangling - Self-host ZXing WASM via Vite ?url import with prepareZXingModule - Use barcode-detector/ponyfill instead of deprecated /pure export - Separate barcode-detector/zxing-wasm into own chunk - Add CAMERA permission to Android manifest for Tauri app
This commit is contained in:
@@ -6,6 +6,9 @@ export default defineConfig({
|
||||
allowedHosts: ["bocken.org"]
|
||||
},
|
||||
plugins: [sveltekit()],
|
||||
optimizeDeps: {
|
||||
exclude: ['barcode-detector']
|
||||
},
|
||||
build: {
|
||||
minify: 'terser',
|
||||
terserOptions: {
|
||||
@@ -25,6 +28,9 @@ export default defineConfig({
|
||||
if (id.includes('@auth/sveltekit')) {
|
||||
return 'auth';
|
||||
}
|
||||
if (id.includes('barcode-detector') || id.includes('zxing-wasm')) {
|
||||
return 'barcode';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user