From 94e7f1cfb58da52f4ac91d16f82b237b4f2e9397 Mon Sep 17 00:00:00 2001 From: Mizok Date: Sun, 17 Apr 2022 06:03:46 +0800 Subject: [PATCH] fix asset module bug --- webpack.config.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/webpack.config.ts b/webpack.config.ts index a27ff82..1a636a2 100644 --- a/webpack.config.ts +++ b/webpack.config.ts @@ -149,7 +149,7 @@ const config = (env: any, argv: any): webpack.Configuration => { ] }, { - test: /\.(jpe?g|png|gif)$/, + test: /\.(jpe?g|png|gif|svg)$/, type: 'asset/resource', generator: { filename: 'assets/images/[name][ext]' @@ -186,8 +186,8 @@ const config = (env: any, argv: any): webpack.Configuration => { ] }, { - test: /\.(woff(2)?|eot|ttf|otf|svg)$/, - type: 'asset/inline', + test: /\.(woff(2)?|eot|ttf|otf)$/, + type: 'asset/resource', generator: { filename: 'assets/fonts/[name][ext]' }