From 194de5af00ae2a920b57bdce60417cfd982763f9 Mon Sep 17 00:00:00 2001 From: NI Date: Sun, 26 Apr 2020 17:48:45 +0800 Subject: [PATCH] Fix the `file-loader` setting to load images correctly --- webpack.config.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index f196398f..3088428f 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -254,7 +254,15 @@ module.exports = { }, { test: /\.(gif|png|jpe?g|svg)$/i, - use: "file-loader" + use: [ + { + loader: "file-loader", + options: { + name: '[contenthash].[ext]', + esModule: false + } + } + ] }, { test: /\.js$/,