* Fallback: try to resolve from the original package for development
(wasmFileName: string)
| 191 | * Fallback: try to resolve from the original package for development |
| 192 | */ |
| 193 | function tryResolveFromPackage(wasmFileName: string): string | null { |
| 194 | try { |
| 195 | // This works in development/monorepo scenarios |
| 196 | return require.resolve(`@vscode/tree-sitter-wasm/wasm/${wasmFileName}`) |
| 197 | } catch { |
| 198 | return null |
| 199 | } |
| 200 | } |
| 201 | |
| 202 | /* ------------------------------------------------------------------ */ |
| 203 | /* 7. One-time library init */ |