aspnet / Templates

This repo is OBSOLETE - please see the README file for information

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

StarterWeb template isn't bundling on build

kstreith opened this issue · comments

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.

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>

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

This issue was moved to aspnet/Templating#89