mirror of
https://github.com/wallabag/wallabag.git
synced 2025-01-29 23:05:10 +01:00
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>
This commit is contained in:
parent
ef7f187fa8
commit
7a1e1247cb
@ -1 +1,4 @@
|
|||||||
import './share.scss';
|
import './share.scss';
|
||||||
|
|
||||||
|
function requireAll(r) { r.keys().forEach(r); }
|
||||||
|
requireAll(require.context('./img/', true, /\.(jpg|png|gif|svg|ico)$/));
|
||||||
|
@ -76,7 +76,8 @@ module.exports = function () {
|
|||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /\.(jpg|png|gif|svg)$/,
|
test: /\.(jpg|png|gif|svg|ico)$/,
|
||||||
|
include: /node_modules/,
|
||||||
use: {
|
use: {
|
||||||
loader: 'file-loader',
|
loader: 'file-loader',
|
||||||
options: {
|
options: {
|
||||||
@ -84,6 +85,17 @@ module.exports = function () {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
test: /\.(jpg|png|gif|svg|ico)$/,
|
||||||
|
exclude: /node_modules/,
|
||||||
|
use: {
|
||||||
|
loader: 'file-loader',
|
||||||
|
options: {
|
||||||
|
context: 'app/Resources/static',
|
||||||
|
name: '[path][name].[ext]',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
test: /\.(eot|ttf|woff|woff2)$/,
|
test: /\.(eot|ttf|woff|woff2)$/,
|
||||||
use: {
|
use: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user