Skip to content

Commit 7810c00

Browse files
committed
Lesson 10 Final
1 parent 49e3ef9 commit 7810c00

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33
<meta charset=utf-8/>
44
<title>My First React Router App</title>
5-
<link rel=stylesheet href=index.css>
5+
<link rel=stylesheet href=/index.css>
66
<div id=app></div>
7-
<script src="bundle.js"></script>
7+
<script src="/bundle.js"></script>
88

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import React from 'react'
22
import { render } from 'react-dom'
3-
import { Router, Route, hashHistory, IndexRoute } from 'react-router'
3+
import { Router, Route, browserHistory, IndexRoute } from 'react-router'
44
import App from './modules/App'
55
import About from './modules/About'
66
import Repos from './modules/Repos'
77
import Repo from './modules/Repo'
88
import Home from './modules/Home'
99

1010
render((
11-
<Router history={hashHistory}>
11+
<Router history={browserHistory}>
1212
<Route path="/" component={App}>
1313
<IndexRoute component={Home}/>
1414
<Route path="/repos" component={Repos}>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "",
55
"main": "index.js",
66
"scripts": {
7-
"start": "webpack-dev-server --inline --content-base ."
7+
"start": "webpack-dev-server --inline --content-base . --history-api-fallback"
88
},
99
"author": "",
1010
"license": "ISC",

webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module.exports = {
33

44
output: {
55
filename: 'bundle.js',
6-
publicPath: ''
6+
publicPath: '/'
77
},
88

99
module: {

0 commit comments

Comments
 (0)