Skip to content

Commit 1e88eff

Browse files
committed
fix: rsk sync issues
1 parent 7bb4be9 commit 1e88eff

File tree

3 files changed

+396
-192
lines changed

3 files changed

+396
-192
lines changed

src/server.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import bodyParser from 'body-parser';
1414
import expressJwt, { UnauthorizedError as Jwt401Error } from 'express-jwt';
1515
import expressGraphQL from 'express-graphql';
1616
import jwt from 'jsonwebtoken';
17-
import fetch from 'node-fetch';
17+
import nodeFetch from 'node-fetch';
1818
import React from 'react';
1919
import { StaticRouter } from 'react-router';
2020
import ReactDOM from 'react-dom/server';
@@ -117,7 +117,7 @@ app.get('*', async (req, res, next) => {
117117
try {
118118
const css = new Set();
119119

120-
const fetch = createFetch(fetch, {
120+
const fetch = createFetch(nodeFetch, {
121121
baseUrl: config.api.serverUrl,
122122
cookie: req.headers.cookie,
123123
});
@@ -128,7 +128,6 @@ app.get('*', async (req, res, next) => {
128128

129129
const store = configureStore(initialState, {
130130
fetch,
131-
// I should not use `history` on server.. but how I do redirection? follow universal-router
132131
});
133132

134133
if (req.user && req.user.login) {

tools/webpack.config.js

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -98,49 +98,6 @@ const config = {
9898
},
9999
},
100100

101-
// Rules for Style Sheets
102-
{
103-
test: reStyle,
104-
rules: [
105-
// Convert CSS into JS module
106-
{
107-
issuer: { not: [reStyle] },
108-
use: 'isomorphic-style-loader',
109-
},
110-
111-
// Process external/third-party styles
112-
{
113-
exclude: path.resolve(__dirname, '../src'),
114-
loader: 'css-loader',
115-
options: {
116-
sourceMap: isDebug,
117-
minimize: !isDebug,
118-
discardComments: { removeAll: true },
119-
},
120-
},
121-
122-
// Process internal/project styles (from src folder)
123-
{
124-
include: [
125-
path.resolve(__dirname, '../src'),
126-
],
127-
loader: 'css-loader',
128-
options: {
129-
// CSS Loader https://github.com/webpack/css-loader
130-
importLoaders: 1,
131-
sourceMap: isDebug,
132-
// CSS Modules https://github.com/css-modules/css-modules
133-
modules: true,
134-
localIdentName: isDebug ? '[name]-[local]-[hash:base64:5]' : '[hash:base64:5]',
135-
// CSS Nano http://cssnano.co/options/
136-
minimize: !isDebug,
137-
discardComments: { removeAll: true },
138-
},
139-
},
140-
],
141-
},
142-
143-
// Handle external/third-party styles (from node_modules)
144101
{
145102
test: /theme.scss$/,
146103
loaders: [

0 commit comments

Comments
 (0)