Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

Commit 9dd50f1

Browse files
Update React samples to use prerender-via-Webpack-loader
1 parent a5509b8 commit 9dd50f1

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

samples/react/MusicStore/Views/Home/Index.cshtml

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
ViewData["Title"] = "Home Page";
33
}
44

5-
<div id="react-app" asp-prerender-module="ReactApp/boot-server"></div>
5+
<div id="react-app" asp-prerender-module="ReactApp/boot-server"
6+
asp-prerender-webpack-config="webpack.config.js"></div>
67

78
@section scripts {
89
<script src="/dist/vendor.bundle.js"></script>

samples/react/MusicStore/package.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"domain-task": "^1.0.0",
2626
"history": "^2.0.0",
2727
"isomorphic-fetch": "^2.2.1",
28-
"ntypescript": "^1.201602072208.1",
28+
"memory-fs": "^0.3.0",
2929
"react": "^0.14.7",
3030
"react-bootstrap": "^0.28.2",
3131
"react-dom": "^0.14.7",
@@ -35,6 +35,8 @@
3535
"react-router-redux": "^2.1.0",
3636
"redux": "^3.2.1",
3737
"redux-thunk": "^1.0.3",
38-
"redux-typed": "^1.0.0"
38+
"redux-typed": "^1.0.0",
39+
"require-from-string": "^1.1.0",
40+
"webpack-externals-plugin": "^1.0.0"
3941
}
4042
}

samples/react/ReactGrid/Views/Home/Index.cshtml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<div id="react-app" asp-prerender-module="ReactApp/boot-server.jsx"></div>
1+
<div id="react-app" asp-prerender-module="ReactApp/boot-server.jsx"
2+
asp-prerender-webpack-config="webpack.config.js"></div>
23

34
@section scripts {
45
<script src="/dist/main.js"></script>

samples/react/ReactGrid/package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,13 @@
99
"formsy-react-components": "^0.6.3",
1010
"griddle-react": "^0.3.1",
1111
"history": "^1.12.6",
12+
"memory-fs": "^0.3.0",
1213
"react": "^0.14.7",
1314
"react-dom": "^0.14.7",
1415
"react-router": "^2.0.0-rc5",
15-
"underscore": "^1.8.3"
16+
"require-from-string": "^1.1.0",
17+
"underscore": "^1.8.3",
18+
"webpack-externals-plugin": "^1.0.0"
1619
},
1720
"devDependencies": {
1821
"babel-loader": "^6.2.1",

0 commit comments

Comments
 (0)