title: Removing specific vendor css from generated Microsoft SPA Template VS2017 webpack
body: <p>I've created a couple of SPA projects using the Microsoft templates.</p>
  
  <pre><code>dotnet new --install Microsoft.AspNetCore.SpaTemplates::*
  </code></pre>
  
  <p>Then running:</p>
  
  <pre><code>dotnet new angular
  </code></pre>
  
  <p>or</p>
  
  <pre><code>dotnet new aurelia
  </code></pre>
  
  <p>Both projects generate file named <code>webpack.config.vendor.js</code> which looks like the following (from angular sample):</p>
  
  <pre><code>const path = require('path');
  const webpack = require('webpack');
  const ExtractTextPlugin = require('extract-text-webpack-plugin');
  const merge = require('webpack-merge');
  
  module.exports = (env) =&gt; {
      const extractCSS = new ExtractTextPlugin('vendor.css');
      const isDevBuild = !(env &amp;&amp; env.prod);
      const sharedConfig = {
          stats: { modules: false },
          resolve: { extensions: [ '.js' ] },
          module: {
              rules: [
                  { test: /\.(png|woff|woff2|eot|ttf|svg)(\?|$)/, use: 'url-loader?limit=100000' }
              ]
          },
          entry: {
              vendor: [
                  '@angular/animations',
                  '@angular/common',
                  '@angular/compiler',
                  '@angular/core',
                  '@angular/forms',
                  '@angular/http',
                  '@angular/platform-browser',
                  '@angular/platform-browser-dynamic',
                  '@angular/router',
                  'bootstrap',
                  'bootstrap/dist/css/bootstrap.css',
                  'es6-shim',
                  'es6-promise',
                  'event-source-polyfill',
                  'jquery',
                  'zone.js',
              ]
          },
          output: {
              publicPath: '/dist/',
              filename: '[name].js',
              library: '[name]_[hash]'
          },
          plugins: [
              new webpack.ProvidePlugin({ $: 'jquery', jQuery: 'jquery' }), // Maps these identifiers to the jQuery package (because Bootstrap expects it to be a global variable)
              new webpack.ContextReplacementPlugin(/\@angular\b.*\b(bundles|linker)/, path.join(__dirname, './ClientApp')), // Workaround for https://github.com/angular/angular/issues/11580
              new webpack.ContextReplacementPlugin(/angular(\\|\/)core(\\|\/)@angular/, path.join(__dirname, './ClientApp')), // Workaround for https://github.com/angular/angular/issues/14898
              new webpack.IgnorePlugin(/^vertx$/) // Workaround for https://github.com/stefanpenner/es6-promise/issues/100
          ]
      };
  
      const clientBundleConfig = merge(sharedConfig, {
          output: { path: path.join(__dirname, 'wwwroot', 'dist') },
          module: {
              rules: [
                  { test: /\.css(\?|$)/, use: extractCSS.extract({ use: isDevBuild ? 'css-loader' : 'css-loader?minimize' }) }
              ]
          },
          plugins: [
              extractCSS,
              new webpack.DllPlugin({
                  path: path.join(__dirname, 'wwwroot', 'dist', '[name]-manifest.json'),
                  name: '[name]_[hash]'
              })
          ].concat(isDevBuild ? [] : [
              new webpack.optimize.UglifyJsPlugin()
          ])
      });
  
      const serverBundleConfig = merge(sharedConfig, {
          target: 'node',
          resolve: { mainFields: ['main'] },
          output: {
              path: path.join(__dirname, 'ClientApp', 'dist'),
              libraryTarget: 'commonjs2',
          },
          module: {
              rules: [ { test: /\.css(\?|$)/, use: ['to-string-loader', isDevBuild ? 'css-loader' : 'css-loader?minimize' ] } ]
          },
          entry: { vendor: ['aspnet-prerendering'] },
          plugins: [
              new webpack.DllPlugin({
                  path: path.join(__dirname, 'ClientApp', 'dist', '[name]-manifest.json'),
                  name: '[name]_[hash]'
              })
          ]
      });
  
      return [clientBundleConfig, serverBundleConfig];
  }
  </code></pre>
  
  <p>Now I want to remove Bootstrap from the equation.  I've tried removing the following lines from entry->bootstrap:</p>
  
  <pre><code>'bootstrap',
  'bootstrap/dist/css/bootstrap.css',
  </code></pre>
  
  <p>But bootstrap still appears in the final vendor.css.  I'm still getting up to speed with WebPack (slowly).</p>
  
  <p>What do I need to do to remove <code>bootstrap</code> from the vendor.css output?</p>