How do I pass npm parameters to dotnet publish?

2019-05-27 01:40发布

问题:

Long story short, private npm registry, corporate network, can't download from github.

I need to pass

--no-optional 

to the

npm install 

that

dotnet publish

executes as part of

Target "PublishRunWebpack: (TargetId:162)"

Any ideas? MSDN documentation @ https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-publish?tabs=netcore21 is super unhelpful.

Using dotnet core 2.1, if it matters :)

Thanks!

回答1:

I swear, StackOverflow's greatest power is that the odds of figuring out your problem increase exponentially as soon as you ask the question.

The

PublishWebPack

is part of the csproj. Unload / edit / modify to your heart's content!