Skip to content

Commit

Permalink
Merge pull request #1058 from wellyshen/refactor/render-html-types
Browse files Browse the repository at this point in the history
Refactor: refine `renderHTML` types & `store` type
  • Loading branch information
wellyshen authored Apr 26, 2021
2 parents 7775dc6 + a2c5985 commit 113d3f1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-cool-starter",
"version": "4.3.3",
"version": "4.3.4",
"private": true,
"description": "A starter boilerplate for a universal web application with the best development experience and best practices.",
"license": "MIT",
Expand Down
8 changes: 5 additions & 3 deletions src/server/renderHtml.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import { ChunkExtractor } from "@loadable/server";
import { HelmetData } from "react-helmet";
import serialize from "serialize-javascript";
import { minify } from "html-minifier";

export default (
head: Record<string, any>,
extractor: Record<string, any>,
head: HelmetData,
extractor: ChunkExtractor,
htmlContent: string,
initialState: Record<string, unknown>
initialState: typeof window.__INITIAL_STATE__
): any => {
const html = `
<!doctype html>
Expand Down
2 changes: 1 addition & 1 deletion src/store/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { routerMiddleware } from "connected-react-router";
import createRootReducer from "./rootReducer";

interface Arg {
initialState?: Record<string, unknown>;
initialState?: typeof window.__INITIAL_STATE__;
url?: string;
}

Expand Down

0 comments on commit 113d3f1

Please sign in to comment.