Interface: BundleOptions
Options for bundling Workflow code using Webpack
Properties
failureConverterPath?
optionalfailureConverterPath?:string
Path to a module with a failureConverter named export.
failureConverter should be an instance of a class that implements FailureConverter.
ignoreModules?
optionalignoreModules?:string[]
List of modules to be excluded from the Workflows bundle.
Use this option when your Workflow code references an import that cannot be used in isolation, e.g. a Node.js built-in module. Modules listed here MUST not be used at runtime.
NOTE: This is an advanced option that should be used with care.
logger?
optionallogger?:Logger
Optional logger for logging Webpack output
payloadConverterPath?
optionalpayloadConverterPath?:string
Path to a module with a payloadConverter named export.
payloadConverter should be an instance of a class that implements PayloadConverter.
plugins?
optionalplugins?:BundlerPlugin[]
List of plugins to register with the bundler.
preloadModules?
optionalpreloadModules?:string[]
List of modules to load once during reusable V8 context bootstrap.
Preloaded modules are shared across workflows that execute in the same reusable V8 context. Module scope in these modules runs before a workflow activator exists, so this option is only appropriate for modules that are safe to initialize that early.
NOTE: This is an advanced option that should be used with care. Preloading modules that internally stores some form of per-workflow state will very likely cause workflow context leak, which may result in non-deterministic behavior and/or cause other unexpected behaviors.
webpackConfigHook?
optionalwebpackConfigHook?: (config) =>Configuration
Before Workflow code is bundled with Webpack, webpackConfigHook is called with the Webpack
configuration object so you can modify it.
Parameters
config
Configuration
Returns
Configuration
workflowInterceptorModules?
optionalworkflowInterceptorModules?:string[]
List of modules to import Workflow interceptors from.
Modules should export an interceptors variable of type WorkflowInterceptorsFactory.
workflowsPath
workflowsPath:
string
Path to look up workflows in, any function exported in this path will be registered as a Workflows when the bundle is loaded by a Worker.