I need to run webpack in prebuild phase and include generated files to package for further deployment in layouts folder. But msbuild does not consider files created during prebuild. How deals with it?
I tried to include files in EnumaratedFiles item group as follows (adding this code to .csproj):
<Target Name="BuildAndIncludeSPAFiles" BeforeTargets="BeforeLayout"> <Exec Command="build-spa.bat" /> <ItemGroup> <EnumaratedFiles Include="Layouts\MyProject\SpaFiles\**" /> </ItemFroup> </Target>
But it fails because items for item group EnumaratedFiles must contain specific metadata.
Version of SharePoint: 2013