Skip to content

Commit 6a87105

Browse files
committed
Minor fixes
1 parent aba63cf commit 6a87105

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

config/webpack/lib-base.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ module.exports = function configFactory(ops) {
5757
}),
5858
],
5959
module: {
60-
noParse: [],
6160
rules: [{
6261
/* Handles font imports in url(..) instructions in CSS. Effectively,
6362
* with such configuration it just rewrites those URLs to point to

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
"jest": "^22.4.3",
6363
"node-sass": "^4.8.3",
6464
"nodelist-foreach-polyfill": "^1.2.0",
65-
"optimize-css-assets-webpack-plugin": "^4.0.0",
65+
"optimize-css-assets-webpack-plugin": "^3.2.0",
6666
"postcss-loader": "^2.1.3",
6767
"postcss-scss": "^1.0.5",
6868
"react-hot-loader": "^4.0.1",
@@ -74,7 +74,7 @@
7474
"stylelint": "^9.2.0",
7575
"stylelint-config-standard": "^18.2.0",
7676
"webpack": "^3.11.0",
77-
"webpack-dev-middleware": "^3.1.0",
77+
"webpack-dev-middleware": "^2.0.6",
7878
"webpack-hot-middleware": "^2.21.2",
7979
"webpack-merge": "^4.1.2"
8080
},

src/server/renderer.jsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import forge from 'node-forge';
88
import fs from 'fs';
99
import path from 'path';
1010
import React from 'react';
11+
import ReactDOM from 'react-dom/server';
1112
import serializeJs from 'serialize-javascript';
1213

1314
import { Helmet } from 'react-helmet';
@@ -113,6 +114,8 @@ export default async function factory(webpackConfig, options) {
113114

114115
if (store) App = <Provider store={store}>{App}</Provider>;
115116

117+
App = ReactDOM.renderToString(App);
118+
116119
/* This takes care about server-side rendering of page title and meta tags
117120
* (still demands injection into HTML template, which happens below). */
118121
helmet = Helmet.renderStatic();

webpack.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ module.exports = function buildConfig(env) {
1414
config.module.rules.find(x => x.loader === 'babel-loader');
1515
babelLoader.options.presets[0] = `${__dirname}/config/babel/webpack`;
1616

17+
if (!config.module.noParse) config.module.noParse = [];
1718
config.module.noParse.push(/src\/shared\/utils\/webpack\/require/);
1819

1920
return config;

0 commit comments

Comments
 (0)