Skip to content

Commit

Permalink
fix pino and pino dependency resolution to ease downstream integrations
Browse files Browse the repository at this point in the history
  • Loading branch information
scholarsmate committed Feb 13, 2025
1 parent 6a85a3d commit ccd9d12
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions packages/client/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
* limitations under the License.
*/

import * as path from 'path'

export * from './change'
export * from './client'
export * from './logger'
Expand All @@ -28,3 +30,18 @@ export * from './viewport'
// generated files from protoc
export * from './omega_edit_grpc_pb'
export * from './omega_edit_pb'

// ---------------------------------------------------------------------------
// Ensure worker files are resolved properly in bundlers (VS Code, Webpack, etc.)
// ---------------------------------------------------------------------------
if (typeof globalThis !== 'undefined') {
globalThis.__bundlerPathsOverrides = {
...((globalThis as any).__bundlerPathsOverrides || {}),

// Resolve all required worker files dynamically
'thread-stream-worker': path.resolve(__dirname, 'thread-stream-worker.js'),
'pino-worker': path.resolve(__dirname, 'pino-worker.js'),
'pino-pipeline-worker': path.resolve(__dirname, 'pino-pipeline-worker.js'),
'pino-file': path.resolve(__dirname, 'pino-file.js'),
}
}

0 comments on commit ccd9d12

Please sign in to comment.