I created a build definition in vsts with npm build and then I copy the build folder to the drop location.
The build pipeline is working fine
Then I created
In my case (react app deployed as static content to app service) I needed to add a step to archive the build directory before publishing it:
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: '$(System.DefaultWorkingDirectory)/build'
includeRootFolder: false
archiveType: 'zip'
archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip'
- publish: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip
artifact: '$(Build.BuildId)'