Skip to content

Commit

Permalink
Configure webpack to load images.
Browse files Browse the repository at this point in the history
Import img files in app.module.js and configure webpack.

Fixes buildbot#4880
  • Loading branch information
rajgoesout committed Jul 24, 2019
1 parent ce20a96 commit a8b6694
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
6 changes: 5 additions & 1 deletion www/base/src/app/app.module.js
Expand Up @@ -90,4 +90,8 @@ require('./workers/worker/worker.route.js');
require('./workers/workeraction.dialog.js');
require('./workers/workers.controller.js');
require('./workers/workers.route.js');

require('../img/favicon.ico');
require('../img/icon.png');
require('../img/icon.svg');
require('../img/icon16.svg');
require('../img/nobody.png');
11 changes: 10 additions & 1 deletion www/base/webpack.config.js
Expand Up @@ -25,8 +25,17 @@ module.exports = function() {
outputPath: outputPath,
extractStyles: true,
extraRules: [{
test: /\.(ttf|eot|svg|woff|woff2)(\?v=[0-9]\.[0-9]\.[0-9])?$/,
test: /\.(ttf|eot|woff|woff2)(\?v=[0-9]\.[0-9]\.[0-9])?$/,
use: 'file-loader'
}, {
test: /\.(jp?eg|png|svg|ico)(\?v=[0-9]\.[0-9]\.[0-9])?$/,
use: [{
loader: 'file-loader',
options: {
name: '[name].[ext]',
outputPath: 'img'
}
}]
}],
extraPlugins: [
new WebpackShellPlugin({
Expand Down

0 comments on commit a8b6694

Please sign in to comment.