Skip to content

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

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

Open
JCMais opened this issue May 10, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@JCMais
Copy link

JCMais commented May 10, 2025

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
}
@JCMais JCMais added the enhancement New feature or request label May 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant