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

  return {
    test: /\.(woff2?|ttf|otf|eot)$/,
    loader: require.resolve("file-loader"),
    options: {
      emitFile: true,
      name: `${paths.frontend.dest.folders.fonts}/[name].[contenthash].[ext]`,
    },
  };
};
