Home

Issue: 907

Can't override default webpack loader config

[issue link]

I’m trying to override the default webpack config for the url-loader using the instructions found at https://nuxtjs.org/api/configuration-build/#loaders. Not having any luck though. Despite changing the folder name to dist/foo and changing the hash length, I’m still seeing images appear in the dist/img folder with a 7 character hash. Ultimately, I’m hoping to do something a little more complex with image-webpack-loader, but right now, not even this is working. Any idea what I’m doing wrong here? Thanks!

loaders: [
    {
      test: /\.(png|jpe?g|gif|svg)$/,
      loader: 'url-loader',
      query: {
        limit: 1000, // 1KO
        name: 'foo/[name].[hash:2].[ext]'
      }
    }
  ]
This question is available on Nuxt.js community (#c780)