gajus / write-file-webpack-plugin

Forces webpack-dev-server to write bundle files to the file system.
Other
527 stars 54 forks source link

Add outputPath as plugin option, override conditional checks #38

Open ksrb opened 7 years ago

ksrb commented 7 years ago

This plugin seems to be a little broken?

This PR lets the sandbox work with webpack@1.14.0 + webpack-dev-server@1.16.2.

I don't think this PR should necessarily be merged as it changes the API but I'm just highlighting the problem and a potential solution.

Additional Details

In webpack 1.x I couldn't get the sandbox to work with webpack@1.14.0 + webpack-dev-server@1.16.2 due to it throwing:

output.path is not. Define output.path.

In webpack 2.x I couldn't get the sandbox to work with webpack@2.3.1 + webpack-dev-server@2.4.2 due to it throwing:

Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
...

There's clearly been a API change in webpack 2.x since the beta 😄 .

odensc commented 7 years ago

Ah - the newest version of this plugin only supports webpack 2.x, hence the major version change. The sandbox should be updated to reflect the version requirement.

jkomusin commented 7 years ago

This would be a very helpful addition for us, as we organize different types of resulting bundles into sub-directories under the root Webpack output path. This flag would allow us to circumvent plugins that don't agree with that, like HotModuleReplacement which dumps hot-update files into the root output path.

gajus commented 6 years ago

Is this still relevant?

odensc commented 6 years ago

@gajus #37 fixed the error, but this could still be useful in the case you'd want write-file-webpack-plugin to write to a different path than output.path.

gajus commented 6 years ago

If the conflicts are resolved, I will merge it.

yyynnn commented 5 years ago

so?