Static GitHub Issues

[1332] Nuxtjs + Vue-svg-loader

prev: nuxtjs + cordova
next: CSS classes order changes when generating site

I am trying to integrate https://www.npmjs.com/package/vue-svg-loader for loading SVG icons inline as vue components.

I have the following in my nuxt.config file:

{
    test: /\.(svg)$/,
    loader: 'vue-svg-loader', // `vue-svg` for webpack 1.x 
 }, {
    test: /\.(png|jpe?g|gif|svg)$/,
    loader: 'url-loader',
    exclude: /(\/icons)/,
    query: {
        limit: 10000, // 10KO
        name: 'img/[name].[hash].[ext]'
    }
}

It seems that the svg files are still being converted to base64 by the url-loader even though I have excluded the path to the svg directory.

Is there a different way to overwrite the url-loader to ignore svg files?

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c1182">#c1182</a>)</em></sub></div>