File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 4
4
"description" : " Server side rendering template for React 16" ,
5
5
"main" : " src/index.js" ,
6
6
"scripts" : {
7
- "start" : " cross-env NODE_ENV=development babel-node src/index" ,
7
+ "start" : " cross-env NODE_ENV=production babel-node src/index" ,
8
8
"watch" : " cross-env NODE_ENV=development babel-watch src/index" ,
9
9
"build" : " npm run build:client && npm run build:server && npm run build:node" ,
10
10
"build:client" : " cross-env NODE_ENV=production webpack -p --config webpack/client.production.js" ,
44
44
"babel-preset-env" : " ^1.6.0" ,
45
45
"babel-preset-react" : " ^6.24.1" ,
46
46
"babel-preset-stage-0" : " ^6.24.1" ,
47
+ "babel-register" : " ^6.26.0" ,
47
48
"copy-webpack-plugin" : " ^4.2.1" ,
48
49
"cross-env" : " ^5.0.5" ,
49
50
"css-hot-loader" : " ^1.3.1" ,
Original file line number Diff line number Diff line change @@ -37,18 +37,18 @@ const configureDevelopment = app => {
37
37
* @param app Express app
38
38
*/
39
39
const configureProduction = app => {
40
- const clientStats = require ( './assets/stats.json' ) ;
41
- const serverRender = require ( './assets/app.server.js' ) . default ;
40
+ const clientStats = require ( '../public /assets/stats.json' ) ;
41
+ const serverRender = require ( '../public /assets/app.server.js' ) . default ;
42
42
const publicPath = '/' ;
43
- const outputPath = join ( __dirname , 'assets' ) ;
43
+ const outputPath = join ( __dirname , '../public/ assets' ) ;
44
44
45
45
app . use ( publicPath , express . static ( outputPath ) ) ;
46
46
app . use ( serverRender ( {
47
47
clientStats,
48
48
outputPath
49
49
} ) ) ;
50
50
51
- app . set ( 'views' , join ( __dirname , 'views' ) ) ;
51
+ app . set ( 'views' , join ( __dirname , '../public/ views' ) ) ;
52
52
} ;
53
53
54
54
const app = express ( ) ;
You can’t perform that action at this time.
0 commit comments