aboutsummaryrefslogtreecommitdiffhomepage
path: root/app/config/webpack/prod.js
diff options
context:
space:
mode:
authorKevin Decherf <kevin@kdecherf.com>2017-10-15 23:57:35 +0200
committerKevin Decherf <kevin@kdecherf.com>2017-10-16 00:01:52 +0200
commit7a1e1247cbc3b7a68c82c45733713c4630e9dcb7 (patch)
tree0d6a7869fa746e62c3c3b93f50557760fa1f0bd9 /app/config/webpack/prod.js
parentef7f187fa8aa18acf68750e5539ccceb524ab598 (diff)
downloadwallabag-7a1e1247cbc3b7a68c82c45733713c4630e9dcb7.tar.gz
wallabag-7a1e1247cbc3b7a68c82c45733713c4630e9dcb7.tar.zst
wallabag-7a1e1247cbc3b7a68c82c45733713c4630e9dcb7.zip
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 <kevin@kdecherf.com>
Diffstat (limited to 'app/config/webpack/prod.js')
-rw-r--r--app/config/webpack/prod.js14
1 files changed, 13 insertions, 1 deletions
diff --git a/app/config/webpack/prod.js b/app/config/webpack/prod.js
index 44961cc5..17b8c384 100644
--- a/app/config/webpack/prod.js
+++ b/app/config/webpack/prod.js
@@ -76,7 +76,8 @@ module.exports = function () {
76 }), 76 }),
77 }, 77 },
78 { 78 {
79 test: /\.(jpg|png|gif|svg)$/, 79 test: /\.(jpg|png|gif|svg|ico)$/,
80 include: /node_modules/,
80 use: { 81 use: {
81 loader: 'file-loader', 82 loader: 'file-loader',
82 options: { 83 options: {
@@ -85,6 +86,17 @@ module.exports = function () {
85 }, 86 },
86 }, 87 },
87 { 88 {
89 test: /\.(jpg|png|gif|svg|ico)$/,
90 exclude: /node_modules/,
91 use: {
92 loader: 'file-loader',
93 options: {
94 context: 'app/Resources/static',
95 name: '[path][name].[ext]',
96 },
97 },
98 },
99 {
88 test: /\.(eot|ttf|woff|woff2)$/, 100 test: /\.(eot|ttf|woff|woff2)$/,
89 use: { 101 use: {
90 loader: 'file-loader', 102 loader: 'file-loader',