1

I am trying to get my webpack to transpile my files into a public/images directory from the app/assets/images but for some reason it is not working. I have used the same script for my font files and all is working fine:

WORKING

  { test: /\.(ttf|eot|svg)(\?v=[0-9]\.[0-9]\.[0-9])?$/,
    exclude: /node_modules/,
    loader: "file-loader?limit=1024&name=fonts/[name].[ext]"
  }

But for some reason the minute the files are changed into image ones with the test, nothing happens.

NOT WORKING

  {
      test: /\.(jpg|jpeg|gif|png|svg)$/,
      exclude: /node_modules/,
      loader: "file-loader?limit=1024&name=images/[name].[ext]"
  }

Am I missing something for images?

HGB
  • 2,157
  • 8
  • 43
  • 74
  • My understanding of these loaders is that they are only called if your code actually references a file that matches the test regex. I assume you have a reference to an image in your code somewhere? – Montgomery 'monty' Jones Jun 05 '17 at 07:59

0 Answers0