-
Notifications
You must be signed in to change notification settings - Fork 105
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
[Feature Request] Support separating bundling and executing of workers #310
Comments
@schickling it'd take some work to support bundling with anything other than webpack from my experience. |
@lorensr @schickling @sw-yx I'd like some feedback on the public API for this. In order to support this we'd need to export the
Example: const workflowCodeBundle = await WorkflowCodeBundler({ workflowsPath });
const worker = await Worker.create({ workflowCodeBundle, ... }); |
By string do you mean path? Awaiting a SentenceCase function feels weird to me. SentenceCase makes me want to do // built-in bundling
const workflowCodeBundle = await bundleWorkflowCode({ workflowsPath });
const worker = await Worker.create({ workflowCodeBundle, ... });
// dev doing their own bundling:
const worker = await Worker.create({ workflowCodeBundle: './bundle.js', ... }); That thing is happening where the word "bundle" is starting to sound really strange to me 😆 |
So the return value of |
We could have both // built-in bundling
const workflowCodeBundle = await bundleWorkflowCode({ workflowsPath });
const worker = await Worker.create({ workflowCodeBundle, ... });
// dev doing their own bundling:
const worker = await Worker.create({ workflowCodeBundle: 'js code', ... });
const worker = await Worker.create({ workflowCodeBundlePath: './bundle.js', ... }); |
IDK, I kind of like the |
Currently the worker entrypoint file(s) (e.g.
src/worker.ts
) are doing both bundling and execution.For my application, I'd like to take the responsibility of the bundling (and e.g. use something like
esbuild
instead of Webpack) and have my worker entrypoint (e.g. invoked bynodemon
) only trigger the actual code execution and not any kind of building/bundling when starting.The text was updated successfully, but these errors were encountered: