commit a70c4da4e668b56ea217eda1825126934bd05449
parent 2f0bf8b9e2c539c463033a6bdc9f128bd3165dc2
Author: Sergej Orlov <wladimirych@gmail.com>
Date: Tue, 5 Apr 2022 09:53:48 +0200
Build: use asset modules instead of deprecated url-loader
This fixes inlining images as data uris for new version of CssLoader
More info: https://webpack.js.org/guides/asset-modules/#inlining-assets
Diffstat:
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/webpack/webpack.config.js b/webpack/webpack.config.js
@@ -11,7 +11,6 @@ const Webpack = require('webpack');
const paths = require('./paths');
const errorExitStatus = 1;
-const urlLoaderSizeLimit = 10000;
const envs = {
production: true,
@@ -124,13 +123,7 @@ const loaders = [
},
{
test: /\.(ico|jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2)(\?.*)?$/u,
- use: {
- loader: 'url-loader',
- options: {
- limit: isProduction || isDevelopment ? urlLoaderSizeLimit : false,
- name: '[path][name].[ext]',
- },
- },
+ type: 'asset/inline',
},
{
test: /\.(html)(\?.*)?$/u,