diff options
Diffstat (limited to 'webpack.config.js')
-rw-r--r-- | webpack.config.js | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/webpack.config.js b/webpack.config.js index 931cc62f9b..11c92e874a 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -211,29 +211,19 @@ module.exports = { }, { test: /\.(ttf|woff2?)$/, - use: [ - { - loader: 'file-loader', - options: { - name: '[name].[ext]', - outputPath: 'fonts/', - publicPath: (url) => `../fonts/${url}`, // required to remove css/ path segment - }, - }, - ], + type: 'asset/resource', + generator: { + filename: 'fonts/[name][ext]', + publicPath: '/', // required to remove css/ path segment + } }, { test: /\.png$/i, - use: [ - { - loader: 'file-loader', - options: { - name: '[name].[ext]', - outputPath: 'img/webpack/', - publicPath: (url) => `../img/webpack/${url}`, // required to remove css/ path segment - }, - }, - ], + type: 'asset/resource', + generator: { + filename: 'img/webpack/[name][ext]', + publicPath: '/', // required to remove css/ path segment + } }, ], }, |