From 6689609a089ad24e64730da2a76275a1ce87058c Mon Sep 17 00:00:00 2001 From: Yann Braga Date: Fri, 5 Aug 2022 12:13:20 +0200 Subject: [PATCH] builder manager: add correct loader type for images --- code/lib/builder-manager/src/index.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/code/lib/builder-manager/src/index.ts b/code/lib/builder-manager/src/index.ts index a3fd5fa18c7..f857728d2ed 100644 --- a/code/lib/builder-manager/src/index.ts +++ b/code/lib/builder-manager/src/index.ts @@ -41,10 +41,13 @@ export const getConfig: ManagerBuilder['getConfig'] = async (options) => { outExtension: { '.js': '.mjs' }, loader: { '.js': 'jsx', - '.png': 'file', - '.jpg': 'file', - '.jpeg': 'file', - '.svg': 'file', + '.png': 'dataurl', + '.gif': 'dataurl', + '.jpg': 'dataurl', + '.jpeg': 'dataurl', + '.svg': 'dataurl', + '.webp': 'dataurl', + '.webm': 'dataurl', }, target: ['chrome100'], platform: 'browser',