I had similar problems like yours. I solved this problem by this undocumented feature of visual studio 2017,2019:

BY manual editing, 
 You can add the following post-build event to package.json
 "-vs-binding": { "AfterBuild": [ "build" ] }

by GUI, 
  in task runner explorer window, 
   select "build" task and let popup context menu open using right-mouse-button,
    select bindings -> After build (make its preceding check box on)
  this will add "-vs-binding" property to your package.json

Either one is okay. This  works on vs 2017 and may works on vs 2019 either.

VS2017,2019 nodejs project build process seems 
  not to actually call my "build" script at all.
we should specify the "build" script as post-build event 
  for vs default nodejs build action.
It seems weired. I hope Microsoft solve this fault using  patches.

task runner explorer capture image

Related Query

More Query from same tag