madskristensen / WebPackTaskRunner

A Visual Studio extension
Other
39 stars 16 forks source link

How to Remove Duplicate Configurations #60

Open jasonhilldm opened 2 years ago

jasonhilldm commented 2 years ago

Installed product versions

Description

I was using this extension with VS2019 Community. I then installed VS2022 Community edition and the extension again and it now shows (old) configuration options for Development and Production. Is it possible to remove those?

Another user posted the same issue with VS2019 on stackoverflow: https://stackoverflow.com/questions/69387892/removing-runner-settings-from-task-runner-explorer-webpack-config-js-in-visual-s

sebasijan commented 2 years ago

I too would love to know how to remove (old) or otherwise useless tasks from this explorer

jasonhilldm commented 2 years ago

Looks like these entries are hard coded in the source:

https://github.com/madskristensen/WebPackTaskRunner/blob/master/src/TaskRunner/TaskRunner.cs

The only different between the two options is that the (Old) options do not pass the --mode parameter into the webpack CLI. I think that parameter was introduced in webpack v4 so I guess this is just supporting older webpack versions.