aspnet / Templates

This repo is OBSOLETE - please see the README file for information
Other
151 stars 57 forks source link

StarterWeb template isn't bundling on build #835

Closed kstreith closed 6 years ago

kstreith commented 7 years ago

The StarterWeb template includes bundleconfig.json, site.min.js and site.min.css. Yet, the templates aren't performing bundling on build or publish to create updated versions of the minified files.

It appears the fix is to add <PackageReference Include="BuildBundlerMinifier" Version="__version__" /> to the .csproj. Is this an accidental oversight with the templates?

I'm using the templates in VS2017 Final.

mlorbetske commented 7 years ago

cc @madskristensen

shravan2x commented 7 years ago

I have the same problem (And was just about to post an issue myself). This works too:

<Target Name="PrepublishScript" BeforeTargets="PrepareForPublish">
    <Exec Command="SET PATH=$(ExternalToolsPath);%PATH% &amp;&amp; bower install" />
    <Exec Command="dotnet bundle" />
</Target>
sayedihashimi commented 7 years ago

I'm not sure if calling Exec here to set the path will impact the second call to dotnet bundle.

Eilon commented 6 years ago

This issue was moved to aspnet/templating#89