Skip to content

Commit 3e5c821

Browse files
author
dominic.tobias
committed
Fixes for sub routing
1 parent 05eb6be commit 3e5c821

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

client/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
<meta name="viewport" content="width=device-width, maximum-scale=1.0, minimum-scale=1.0, initial-scale=1.0" />
55
<meta charset="utf-8">
66
<title>React Router + Webpack 2 + Dynamic Chunk Navigation</title>
7-
<link href="./style.css" media="all" rel="stylesheet" />
7+
<link href="/style.css" media="all" rel="stylesheet" />
88
</head>
99
<body>
1010
<div id="root"></div>
11-
<script src="./vendor.bundle.js"></script>
12-
<script src="./bundle.js"></script>
11+
<script src="/vendor.bundle.js"></script>
12+
<script src="/bundle.js"></script>
1313
</body>
1414
</html>

webpack.config.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,18 @@ module.exports = {
1010
context: path.join(__dirname, './client'),
1111
entry: {
1212
js: [
13-
'index', 'pages/Home'
13+
'index',
14+
'pages/Home'
1415
],
1516
vendor: [
16-
'react', 'react-dom'
17+
'react',
18+
'react-dom'
1719
]
1820
},
1921
output: {
2022
path: path.join(__dirname, './static'),
21-
filename: 'bundle.js'
23+
filename: 'bundle.js',
24+
publicPath: '/'
2225
},
2326
module: {
2427
loaders: [

0 commit comments

Comments
 (0)