File tree Expand file tree Collapse file tree 4 files changed +20
-4
lines changed
Expand file tree Collapse file tree 4 files changed +20
-4
lines changed Original file line number Diff line number Diff line change 1111 "devDependencies" : {
1212 "puppeteer" : " ^24.36.0" ,
1313 "typescript" : " ~5.9.3" ,
14- "vite" : " ^7.2.4"
14+ "vite" : " ^7.2.4" ,
15+ "vite-tsconfig-paths" : " ^6.0.5"
1516 },
1617 "dependencies" : {
1718 "@ffmpeg/core" : " ^0.12.10" ,
Original file line number Diff line number Diff line change 11import type { FileData , FileFormat , FormatHandler } from "../FormatHandler.ts" ;
22
3- import { QOIDecoder , QOIEncoder } from "./ qoi-fu/transpiled/QOI.ts " ;
3+ import { QOIDecoder , QOIEncoder } from "qoi-fu" ;
44
55class qoiFuHandler implements FormatHandler {
66
Original file line number Diff line number Diff line change 2525 "noUnusedParameters" : true ,
2626 "erasableSyntaxOnly" : true ,
2727 "noFallthroughCasesInSwitch" : true ,
28- "noUncheckedSideEffectImports" : true
28+ "noUncheckedSideEffectImports" : true ,
29+ /**
30+ * The TS transpilation of the qoi-fu dependency isn't compabile with
31+ * our settings. They do provide a JS file, but tsc _really_ wants to
32+ * import the TS file instead. We define a custom path to steer it
33+ * away from the TS file.
34+ */
35+ "baseUrl" : " ." ,
36+ "paths" : {
37+ "qoi-fu" : [" ./src/handlers/qoi-fu/transpiled/QOI.js" ]
38+ }
2939 },
3040 "include" : [
3141 " src"
42+ ],
43+ "exclude" : [
44+ " src/handlers/qoi-fu/**/*"
3245 ]
3346}
Original file line number Diff line number Diff line change 11import { defineConfig } from "vite" ;
22import { viteStaticCopy } from "vite-plugin-static-copy" ;
3+ import tsconfigPaths from "vite-tsconfig-paths" ;
34
45export default defineConfig ( {
56 optimizeDeps : {
@@ -20,6 +21,7 @@ export default defineConfig({
2021 dest : "wasm"
2122 }
2223 ]
23- } )
24+ } ) ,
25+ tsconfigPaths ( )
2426 ]
2527} ) ;
You can’t perform that action at this time.
0 commit comments