-
Notifications
You must be signed in to change notification settings - Fork 27
Fix TypeScript protobuf resolution #474
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
90d2e7f
3d18330
fee8e2b
28a5a59
ddcae3a
c50b2c5
49e7445
f1de192
e181e3b
c968d4a
6f71bfc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| import { NativeConnection, Runtime, Worker } from '@temporalio/worker'; | ||
| import { Client } from '@temporalio/client'; | ||
| import { dirname } from 'node:path'; | ||
| import { createActivities } from '../../workerlib/kitchensink/activities'; | ||
| import type { ClientConfig, App, WorkerContext } from '../../harness'; | ||
|
|
||
|
|
@@ -39,6 +40,15 @@ async function buildWorker(client: Client, context: WorkerContext): Promise<Work | |
| activities: createActivities(client, context.errOnUnimplemented), | ||
| taskQueue: context.taskQueue, | ||
| ...context.workerOptions, | ||
| bundlerOptions: { | ||
| webpackConfigHook(config) { | ||
| config.resolve!.alias = { | ||
| ...config.resolve!.alias, | ||
| protobufjs: dirname(require.resolve('protobufjs/package.json')), | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change is unexpected (i.e. you should not need that), and quite surprising (i.e. even assuming you need it, it should not point to a package.json file).
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, it's odd eh? I'll leave this claim from my agent here for posterity:
|
||
| }; | ||
| return config; | ||
| }, | ||
| }, | ||
| dataConverter: { | ||
| ...context.workerOptions.dataConverter, | ||
| payloadConverterPath: payloadConverterPath(), | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ie latest main