You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't have time to make a small reproducible example but I found where the issue lies. In bin/webpack-dev-server.js you had a wpOpt variable which was being shadowed by function processOptions(wpOpt) {. 69239ce changed this but unfortunately you missed a few on lines 341 and 349 (both lines contain startDevServer(wpOpt, options);) This is causing them to load the formerly shadowed variable which I'm assuming contains some form of the config. Unfortunately if you have a promise based config this means that the promise unwrap code at the top of the function never runs on the variable which is passed in, resulting in the error below
Expected Behavior
A working server
Actual Behavior
Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
configuration.entry should be one of these:
object { : non-empty string | [non-empty string] } | non-empty string | [non-empty string] | function
The entry point(s) of the compilation.
Details:
configuration.entry should be an object.
configuration.entry should be a string.
configuration.entry[1] should be a string.
configuration.entry should be an instance of function
function returning an entry object or a promise..
For Bugs; How can we reproduce the behavior?
It should happen for any promise based config
For Features; What is the motivation and/or use-case for the feature?
The text was updated successfully, but these errors were encountered:
@waterfoul thanks for the report. unfortunately I'm having a hard time following you. looking at that commit, the only thing that changed with processOptions was a code format change. The functions are identical in functionality between the two commits: 69239ce#diff-83c4482ab4d62154c877147880243858L221
Managed to get to the bottom of it. Moving forward, please try to be as specific as possible in issues with regard to the lines causing issues. It wasn't immediately clear what you were trying to convey when speaking about the lines mentioned; those two lines were using the wrong variables as the first parameter, and should have been using webpackOptions, instead of wpOpt from the top level scope.
Code
I don't have time to make a small reproducible example but I found where the issue lies. In bin/webpack-dev-server.js you had a
wpOpt
variable which was being shadowed byfunction processOptions(wpOpt) {
. 69239ce changed this but unfortunately you missed a few on lines 341 and 349 (both lines containstartDevServer(wpOpt, options);
) This is causing them to load the formerly shadowed variable which I'm assuming contains some form of the config. Unfortunately if you have a promise based config this means that the promise unwrap code at the top of the function never runs on the variable which is passed in, resulting in the error belowExpected Behavior
A working server
Actual Behavior
Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
object { : non-empty string | [non-empty string] } | non-empty string | [non-empty string] | function
The entry point(s) of the compilation.
Details:
function returning an entry object or a promise..
For Bugs; How can we reproduce the behavior?
It should happen for any promise based config
For Features; What is the motivation and/or use-case for the feature?
The text was updated successfully, but these errors were encountered: