Skip to content

Commit 20f564d

Browse files
committed
Remove unnecessary client JS
1 parent d1b7103 commit 20f564d

File tree

4 files changed

+2
-8
lines changed

4 files changed

+2
-8
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"postcss-loader": "^0.4.3",
3535
"raw-loader": "^0.5.1",
3636
"react": "^0.13.3",
37-
"react-to-html-webpack-plugin": "^2.1.0",
37+
"react-to-html-webpack-plugin": "^2.2.0",
3838
"style-loader": "^0.12.3",
3939
"url-loader": "^0.5.6",
4040
"webpack": "^1.9.10",

src/index.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,4 @@ import React from 'react';
22

33
import App from './components/App';
44

5-
if (typeof document !== 'undefined') {
6-
React.render(<App />, document.getElementById('outlet'));
7-
}
8-
95
export default App;

src/template.ejs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,5 @@
88
<div id="outlet">
99
<%- html %>
1010
</div>
11-
<% for (var chunk in assets) { -%>
12-
<script src="<%= assets[chunk] %>"></script>
13-
<% } -%>
1411
</body>
1512
</html>

webpack.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ module.exports = {
3535
plugins: [
3636
new ExtractTextPlugin('style.css', { allChunks: true }),
3737
new ReactToHtmlPlugin('index.html', 'index.js', {
38+
static: true,
3839
template: ejs.compile(fs.readFileSync(__dirname + '/src/template.ejs', 'utf-8'))
3940
})
4041
]

0 commit comments

Comments
 (0)