module.exports = () => {
  const paths = require("../paths");

  return {
    test: /\.(gif|png|jpe?g|svg)$/i,
    loader: require.resolve("file-loader"),
    options: {
      emitFile: true,
      name: `${paths.frontend.dest.folders.images}/[name].[contenthash].[ext]`,
    },
  };
};
