Skip to content
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

allow webpack configuration to be customized per project #641

Closed
justinedelson opened this issue Jan 17, 2024 · 3 comments
Closed

allow webpack configuration to be customized per project #641

justinedelson opened this issue Jan 17, 2024 · 3 comments
Labels

Comments

@justinedelson
Copy link
Member

Expected Behaviour

There should be a way to customize the webpack configuration used by helix-deploy, e.g. to add plugins.

Actual Behaviour

There isn't :(

Reproduce Scenario (including but not limited to)

I have a use case where I need to modify the webpack-bundled code to add instrumentation. The task can be done with a webpack plugin although there's no place (at least that I can see) to inject that into the webpack config.

Steps to Reproduce

Platform and Version

Sample Code that illustrates the problem

Logs taken while reproducing problem

justinedelson added a commit to justinedelson/helix-deploy that referenced this issue Jan 17, 2024
This is a fairly simple extension point that depends upon a statically
named file hlx.webpack.customize.js. This is expected to export
a default function that accepts the hedy config and the webpack config
and returns the webpack config.
@tripodsan
Copy link
Contributor

what exactly is your use case? I think that replacing the entire webpack config is probably not very helpful, as it contains many internal logic.

@justinedelson
Copy link
Member Author

justinedelson commented Jan 17, 2024

My (current) use case is adding a plugin which addresses compatibility issues between webpack-bundled code and opentelemetry-js (elastic/require-in-the-middle#35 describes the problem although the plugin code in that issue is quite outdated and isn't directly applicable for a variety of reasons).

It is certainly plausible to have an extension point that only does this (if this is deemed too much of a footgun), but I was aiming for something that didn't have to be revisited later.

justinedelson added a commit to justinedelson/helix-deploy that referenced this issue Jan 17, 2024
This is a fairly simple extension point that depends upon a statically
named file hlx.webpack.customize.js. This is expected to export
a function named extraPlugins that accepts the hedy config and the
webpack config and returns an array of plugins.

This is an alternative to adobe#642 which provides a narrower extension point.
github-actions bot pushed a commit that referenced this issue Jan 18, 2024
# [10.2.0](v10.1.0...v10.2.0) (2024-01-18)

### Features

* allow addition of webpack plugins. ([95eb9bb](95eb9bb)), closes [#641](#641) [#642](#642)
Copy link

🎉 This issue has been resolved in version 10.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants