Support statics

This commit is contained in:
Dan Abramov
2016-07-15 22:21:07 +01:00
committed by Christopher Chedeau
parent bac207bde5
commit d0c25cb725
5 changed files with 35 additions and 6 deletions

View File

@@ -23,12 +23,15 @@
"eslint-plugin-import": "^1.10.3",
"eslint-plugin-jsx-a11y": "^1.5.5",
"eslint-plugin-react": "^5.2.2",
"file-loader": "^0.9.0",
"html-webpack-plugin": "^2.22.0",
"json-loader": "^0.5.4",
"postcss-loader": "^0.9.1",
"react": "^15.2.1",
"react-dom": "^15.2.1",
"rimraf": "^2.5.3",
"style-loader": "^0.13.1",
"url-loader": "^0.5.7",
"webpack": "^1.13.1",
"webpack-dev-server": "^1.14.1"
}

View File

@@ -1,10 +1,12 @@
import React from 'react';
import './App.css';
import reactImage from './react.png';
export default function App() {
return (
<div className="App">
Hello world!
<img src={reactImage} alt="React rocks!" />
</div>
);
}

BIN
src/react.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

View File

@@ -24,15 +24,27 @@ module.exports = {
}
],
loaders: [
{
test: /\.js$/,
include: path.resolve(__dirname, 'src'),
loader: 'babel'
},
{
test: /\.css$/,
include: path.resolve(__dirname, 'src'),
loader: 'style!css!postcss'
},
{
test: /\.js$/,
include: path.resolve(__dirname, 'src'),
loader: 'babel'
test: /\.json$/,
loader: 'json'
},
{
test: /\.(jpg|png|gif|eot|svg|ttf|woff|woff2)$/,
loader: 'file',
},
{
test: /\.(mp4|webm)$/,
loader: 'url?limit=10000'
}
]
},

View File

@@ -22,15 +22,27 @@ module.exports = {
}
],
loaders: [
{
test: /\.js$/,
include: path.resolve(__dirname, 'src'),
loader: 'babel'
},
{
test: /\.css$/,
include: path.resolve(__dirname, 'src'),
loader: 'style!css!postcss'
},
{
test: /\.js$/,
include: path.resolve(__dirname, 'src'),
loader: 'babel'
test: /\.json$/,
loader: 'json'
},
{
test: /\.(jpg|png|gif|eot|svg|ttf|woff|woff2)$/,
loader: 'file',
},
{
test: /\.(mp4|webm)$/,
loader: 'url?limit=10000'
}
]
},