From 7a1e1247cbc3b7a68c82c45733713c4630e9dcb7 Mon Sep 17 00:00:00 2001 From: Kevin Decherf Date: Sun, 15 Oct 2017 23:57:35 +0200 Subject: webpack: handle _global img folder Fixes missing image files after composer cleaning assets Source of requireAll(): https://stackoverflow.com/a/30652110 Signed-off-by: Kevin Decherf --- app/Resources/static/themes/_global/share.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'app/Resources') diff --git a/app/Resources/static/themes/_global/share.js b/app/Resources/static/themes/_global/share.js index d7078616..15206b37 100644 --- a/app/Resources/static/themes/_global/share.js +++ b/app/Resources/static/themes/_global/share.js @@ -1 +1,4 @@ import './share.scss'; + +function requireAll(r) { r.keys().forEach(r); } +requireAll(require.context('./img/', true, /\.(jpg|png|gif|svg|ico)$/)); -- cgit v1.2.3