title: Vue 3 VuePreloadPlugin
body: <p>for some reason it doesn't load my css.
  So this is my vue.config.js:</p>
  <pre><code>const path = require(&quot;path&quot;);
  const CompressionPlugin = require(&quot;compression-webpack-plugin&quot;);
  const VuePreloadPlugin = require(&quot;@vue/preload-webpack-plugin&quot;);
  
  const myCompressionPlug = new CompressionPlugin({
    algorithm: &quot;gzip&quot;,
    test: /\.js$|\.ts$\.css$|\.png$|\.svg$|\.jpg$|\.woff2$/i,
    deleteOriginalAssets: false,
  });
  
  const myPreloadPlug = new VuePreloadPlugin({
    rel: &quot;preload&quot;,
    as(entry) {
      if (/\.(woff(2)?)(\?v=[0-9]\.[0-9]\.[0-9])?$/.test(entry)) {
        return &quot;font&quot;;
      }
    },
    fileBlacklist: [/\.js/],
    fileWhitelist: [/\.(woff(2)?)(\?v=[0-9]\.[0-9]\.[0-9])?$/],
    include: &quot;allAssets&quot;,
  });
  
  module.exports = {
    productionSourceMap: process.env.NODE_ENV !== &quot;production&quot;,
    chainWebpack: (config) =&gt; {
      config.plugins.delete(&quot;prefetch&quot;);
      config.plugin(&quot;CompressionPlugin&quot;).use(myCompressionPlug);
      const types = [&quot;vue-modules&quot;, &quot;vue&quot;, &quot;normal-modules&quot;, &quot;normal&quot;];
      types.forEach((type) =&gt; addStyleResource(config.module.rule(&quot;stylus&quot;).oneOf(type)));
      config.plugin(&quot;PreloadPlugin&quot;).use(myPreloadPlug);
    },
  };
  
  
  // Not loading css
  function addStyleResource(rule) {
    rule
      .use(&quot;style-resource&quot;)
      .loader(&quot;style-resources-loader&quot;)
      .options({
        patterns: [
          path.resolve(__dirname, &quot;./src/assets/css/swiper-bundle.min.css&quot;),
          path.resolve(__dirname, &quot;./src/assets/css/nice-select.css&quot;),
          path.resolve(__dirname, &quot;./src/assets/css/all.min.css&quot;),
          path.resolve(__dirname, &quot;./src/assets/css/style.css&quot;),
        ],
      });
  }
  </code></pre>
  <p><strong>it does load the woff2, but not the css.</strong></p>
  <p>my css located at: src/assets/css/</p>
  <p>I would like to add some css that is in the node modules(like primevue css), how can i do it?</p>