Skip to content

Commit

Permalink
process images file
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyJoe025 committed Aug 23, 2017
1 parent 6d9fb45 commit 566e062
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
Binary file added app/images/react-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<html>
<head>
<meta charset="UTF-8"/>
<title>react webpack scaffold</title>
</head>
<body>
<div id="app"></div>
Expand Down
3 changes: 3 additions & 0 deletions app/pages/home/home.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import React, {Component} from 'react'

import logoImage from '../../images/react-logo.png'

class Home extends Component{
render() {
return (
<div>
<h1>this is home page</h1>
<img src={logoImage}/>
</div>
)
}
Expand Down
5 changes: 2 additions & 3 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@ module.exports = {
module: {
rules: [
{
test: /\.(bmp|gif|jpe?g|png)$/,
test: /\.(bmp|gif|jpg|jpeg|png|svg)$/,
use: {
loader: 'url-loader',
options: {
limit: 10000,
name: 'images/[name].[ext]'
limit: 10240
}
}
},
Expand Down

0 comments on commit 566e062

Please sign in to comment.