Closed crbranch closed 8 years ago
@crbranch It looks like this CLI option was changed back on January 20th. See the offending commit in bin/webpack.js
here. I'm researching this to determine why the rename occurred. The --colors
switch does work with the latest release of Webpack 1.x, so only 2.x is impacted. I'll let you know what I find out.
To provide an update, it looks like the supports-color
module was added to Webpack as a dependency back on 2/5/2015. It's that module in particular that expects the --color
and --no-color
switches to be used for toggling the coloring. I've successfully tested the --color
switch in the Webpack 1.x branch from 1.12.12 all the way back to 1.10.5, and I suspect that it's supported even further back than that version. I'll work on a commit for this and hope to have it ready tonight or early tomorrow. At that point, you could test this using the nightly build link for the extension.
@scottaddie Thanks for investigating and working on a fix. I appreciate it! One suggestion, if feasible, would be to move the webpack command line(s) out of the C# code to a config file or somewhere that is more easily accessible in case webpack options change again in the future. I'm not sure if VS plugins have config files, but if this had been in a config file, I could have potentially made the change myself. Just a thought.
Interesting idea. Perhaps put a JSON file in the %UserProfile% called webpackvs.json or something like that. We can then add a button to the Solution Explorer context menu when you right-click on webpack.config.js that will open the JSON file for editing
I really like this idea as well. Webpack options are sure to break/change with the final release of Webpack 2. For example, the --bail
switch will be enabled by default.
@crbranch The fix for this issue has been committed. Feel free to install the latest version of the extension via the "nightly build" link found on the README page.
@scottaddie I can confirm the latest version of Webpack Task Runner (1.4.53) fixes the issue. Thanks again for your help, and the quick turnaround!
@crbranch Thank you for reporting the issue and for testing the fix! I'll work with Mads to see if we can make your awesome config file idea a reality.
With webpack 2.0.5-beta installed, executing "Run - Development" or "Run - Production" tasks causes webpack to display an error message:
Unknown argument: colors
should be