-
Notifications
You must be signed in to change notification settings - Fork 26.1k
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
Support array of webpack configs in next.config.js #1306
Comments
@ericclemmons Yep. That should be possible. |
@arunoda That's correct and to be expected by multiple configs (potentially) referencing shared modules. What |
My current project would greatly benefit from this. I am happy to contribute if given a direction. |
Having multiple build targets manually by manipulating webpack is not something we want to expose to users. We do want to expose build targets however. This will be added in the near future. This is a rather old issue, but since Next.js 5.0 we run webpack on both server and client code, solving most issues related to universal compilation. |
Issues like #774 & #972 are fine as long as the new entry-point can have vendors &
commons.js
extracted the same asmain.js
.Resolving this requires exporting a different webpack config, but the signature requires
return config;
, asreturn [config, otherEntryConfig];
fails.If an array of configs were supported by default, having separate build targets (e.g. #1245) & entry-points could be possible.
The text was updated successfully, but these errors were encountered: