File tree Expand file tree Collapse file tree 3 files changed +5
-18
lines changed Expand file tree Collapse file tree 3 files changed +5
-18
lines changed Original file line number Diff line number Diff line change 4
4
<meta charset =" utf-8" >
5
5
<meta name =" viewport" content =" width=device-width, initial-scale=1.0" />
6
6
<title >React Router: Declarative Routing for React.js</title >
7
- <base href =" <%= htmlWebpackPlugin.options.baseHref %>" />
7
+ <base href =" <%= webpackConfig.output.publicPath %>" />
8
8
<style >
9
9
html , body , #app { height : 100% ; margin : 0 }
10
10
* , * :before , * :after { box-sizing : border-box ; }
Original file line number Diff line number Diff line change 1
1
{
2
- "name" : " react-router-website" ,
3
- "version" : " 0.0.0" ,
4
2
"private" : true ,
5
3
"scripts" : {
6
- "dev" : " webpack-dev-server --inline" ,
7
- "build" : " npm run clean && webpack -p" ,
8
- "clean" : " rm -rf build" ,
9
- "start" : " npm run build && pushstate-server build/"
10
- },
11
- "dependencies" : {
12
- "pushstate-server" : " 1.14.0"
4
+ "build" : " webpack -p" ,
5
+ "start" : " webpack-dev-server --inline"
13
6
},
14
7
"devDependencies" : {
15
8
"bundle-loader" : " 0.5.4" ,
20
13
"markdown-it" : " ^7.0.0" ,
21
14
"postcss-loader" : " 0.9.1" ,
22
15
"prismjs-loader" : " 0.0.3" ,
23
- "pushstate-server" : " ^1.14.0" ,
24
16
"react-motion" : " ^0.4.4" ,
25
17
"style-loader" : " 0.13.1" ,
26
18
"url-loader" : " ^0.5.7" ,
Original file line number Diff line number Diff line change
1
+ const path = require ( 'path' )
1
2
const webpack = require ( 'webpack' )
2
3
const HTMLWebpackPlugin = require ( 'html-webpack-plugin' )
3
- const path = require ( 'path' )
4
4
5
5
const HASH = '[chunkHash]'
6
- const PROD = process . env . NODE_ENV === 'production'
7
-
8
6
const ROUTER_SRC = path . join ( __dirname , '..' , 'modules' )
9
7
10
8
module . exports = {
11
-
12
9
devtool : 'source-map' ,
13
10
14
11
entry : {
@@ -19,14 +16,12 @@ module.exports = {
19
16
output : {
20
17
path : path . join ( __dirname , 'build' ) ,
21
18
filename : `bundle-${ HASH } .js` ,
22
- chunkFileName : `[name]-${ HASH } .js` ,
23
- pubicPath : PROD ? 'build/' : ''
19
+ chunkFileName : `[name]-${ HASH } .js`
24
20
} ,
25
21
26
22
plugins : [
27
23
new webpack . optimize . CommonsChunkPlugin ( 'vendor' , `vendor-${ HASH } .js` ) ,
28
24
new HTMLWebpackPlugin ( {
29
- baseHref : PROD ? '//reacttraining.github.io/react-router/' : '/' ,
30
25
template : 'index.html.ejs'
31
26
} )
32
27
] ,
You can’t perform that action at this time.
0 commit comments