Skip to content

Commit

Permalink
Add image and process using Webpack
Browse files Browse the repository at this point in the history
  • Loading branch information
frederikprijck committed Feb 15, 2020
1 parent f7d34fa commit c860be3
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 38 deletions.
48 changes: 13 additions & 35 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions src/app/core/components/app/app.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<div class="app">
<img src="../../../../assets/image.png" />
<div ui-view></div>
</div>
6 changes: 5 additions & 1 deletion src/app/core/components/app/app.component.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.app {
padding: 5px 15px;
}
img {
width: 50px;
height: 50px;
}
}
2 changes: 1 addition & 1 deletion src/app/core/components/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ import './app.component.scss';

export class App implements angular.IComponentOptions {
static selector = 'app';
static template = '<div class="app" ui-view></div>';
static template = require('./app.component.html');
}
Binary file added src/assets/image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 6 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,12 @@ module.exports = {

{
test: /\.(jpg|png|gif)$/,
use: 'file-loader'
use: [{
loader: 'file-loader',
options: {
esModule: false,
},
}],
},

{
Expand Down

0 comments on commit c860be3

Please sign in to comment.