Skip to content

Commit c860be3

Browse files
Add image and process using Webpack
1 parent f7d34fa commit c860be3

File tree

6 files changed

+29
-38
lines changed

6 files changed

+29
-38
lines changed

package-lock.json

Lines changed: 13 additions & 35 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<div class="app">
2+
<img src="../../../../assets/image.png" />
3+
<div ui-view></div>
4+
</div>
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
.app {
22
padding: 5px 15px;
3-
}
3+
img {
4+
width: 50px;
5+
height: 50px;
6+
}
7+
}

src/app/core/components/app/app.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ import './app.component.scss';
55

66
export class App implements angular.IComponentOptions {
77
static selector = 'app';
8-
static template = '<div class="app" ui-view></div>';
8+
static template = require('./app.component.html');
99
}

src/assets/image.png

101 KB
Loading

webpack.config.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,12 @@ module.exports = {
4949

5050
{
5151
test: /\.(jpg|png|gif)$/,
52-
use: 'file-loader'
52+
use: [{
53+
loader: 'file-loader',
54+
options: {
55+
esModule: false,
56+
},
57+
}],
5358
},
5459

5560
{

0 commit comments

Comments
 (0)