-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Unclear config issue when using API? "Error: Invalid path" #88
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
Comments
output: {
library: '[name]',
filename: './build/js/[name].js'
}, should be output: {
path: require("path").resolve("./build/js"),
library: '[name]',
filename: '[name].js'
}, |
Ah thanks! I also looked deeper and noticed that the webpack-dev-middleware readme indicates that |
I assume the leading |
The leading I have simplified my issue repo to demonstrate the issue without the This still causes problems
This solves the problem
I suspect that this is because the path is a psudo-required configuration property. Per the webpack-dev-middleware usage example:
It seems that the webpack-dev-server CLI automatically defaults this in I could suggest adding in a line in the webpack-dev-middleware. It seems to work in my tests but I'm not confident of what effects it might have. |
Same issue here, using the proposed fix from @sokra
works like a charm. |
This just cost me a few hours of frustration trying to move an existing project from dev server to middleware. A validation of |
I just started getting this with webpack-hot-middleware today and the cause was a recent refactor of my webpack config builder to es6, now using export default. Fix for me was to change |
I encountered this issue trying to find the middle-ground for I did not modify In my case, I was importing a stylesheet that had previously been local to a container component, but I switched the stylesheet to be global by default, and my build failed with the same error message. I believe my |
#337 was fixed in the latest beta release. This means that the dev-server CLI does no longer overwrite I'll look into having some validation for |
|
Repo replicating the issue: https://github.com/scvnc/webpack-dev-server-grief
My webpack config seems to be configured correctly because running the CLI
webpack-dev-server
is successful. However when using the gulp example from the webpack docs: I can't seem to successfully invoke the webpack dev server. What is going on?The text was updated successfully, but these errors were encountered: