Skip to content

[Feature Request] Pass webpack obj as the second parameter when calling webpackConfigHook #1713

Open
@JCMais

Description

@JCMais

Describe the solution you'd like

Right now webpackConfigHook only receives the current webpack config, which means if we need to use things like DefinePlugin, the caller has to import webpack directly. This may cause issues as the caller may wrongly use a webpack version different from the one used by @temporalio/worker.

Ideally, we can do something like this:

webpackConfigHook(config, webpack) {
  // ... do something with webpack, such as 
  config.plugins.push(
      new webpack.DefinePlugin({
          'someValue': {},
      })
  )

  return config
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions