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

Add support for webpack config defined as function #339

Merged
merged 1 commit into from
Nov 1, 2023
Merged

Conversation

lev875
Copy link
Contributor

@lev875 lev875 commented Oct 28, 2023

Fixes issue #315

  • Added support for custom webpack config defined as function
  • Added support for custom webpack config defined as promise
  • Added tests for both cases
    • cjs config
    • esm config

The loadConfig function is deliberately made async, so:

  1. If the custom webpack config function returns a promise — it is resolved and the result is passed to webpack.
  2. If the custom webpack config is an object, or it is a synchronous function — the await statement has no effect and the resulting object is passed as is.

@ai ai merged commit 2f8fe3d into ai:main Nov 1, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants