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

Do not overwrite the output.path #337

Closed
gajus opened this issue Dec 8, 2015 · 7 comments
Closed

Do not overwrite the output.path #337

gajus opened this issue Dec 8, 2015 · 7 comments
Labels

Comments

@gajus
Copy link
Member

gajus commented Dec 8, 2015

webpack-dev-server overwrites the output.path parameter of the user supplied config (gajus/write-file-webpack-plugin#1).

  • User supplied config should be immutable.
  • There is no reason to overwrite the output.path.
  • This makes the original output.path value inaccessible from the plugin.
@gajus
Copy link
Member Author

gajus commented Jan 22, 2016

@sokra Any chance of this behaviour changing in 2.0.0?

@SpaceK33z
Copy link
Member

SpaceK33z commented Sep 3, 2016

This also caused the issue in #266, probably #473, and would be a good first step to fix #106.

@sokra, what's your opinion about this? I'd say that we should require output.path to be supplied by the user, and throw an error if it's not set. I'm note sure about the reason why it's there in the first place, so I don't feel comfortable removing this.

@sokra
Copy link
Member

sokra commented Sep 5, 2016

WDS doesn't use the output.path. But I think we could just remove the assignment and it should work fine.

The assignment was originally to enforce linux style paths, because the prev versions of memory-fs doesn't support windows style paths. But as it supports it now it should be fine to remove this.

@SpaceK33z
Copy link
Member

@sokra, all right, I'll remove that in v2 then.

SpaceK33z added a commit that referenced this issue Sep 5, 2016
The assignment was originally to enforce linux style paths, because the prev versions of memory-fs doesn't support windows style paths.
But as it supports it now it should be fine to remove this.

Ref #337
@SpaceK33z
Copy link
Member

Removed it in the above commit. Performed a few tests with different setups in the examples/ dir, and everything still seems to work. Luckily we're running a beta anyway, so we can test this out on our beta users.

@codingleo
Copy link

Hey guys! I'm still having the same issue here.

Does the v2 is ready for npm? I'm also having the current versions:

"webpack-dev-server": "~1.16.2",
"webpack-dev-middleware": "~1.8.4"

And having the error:

screen shot 2016-10-26 at 13 53 41

@dsebastien
Copy link

dsebastien commented Dec 16, 2016

Just to clarify for me: with Webpack 1.x we had to define outputPath in our devServer config so that we could have the resources written on disk (via write-file-webpack-plugin).

Can I now remove outputPath from my devServer config with Webpack 2 rc1 / webpack-dev-server 2 rc1 ?

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

5 participants