{"_id":"@react-ssr/static","_rev":"96-9fceff3af14150dd40f606ec6f5cb474","name":"@react-ssr/static","dist-tags":{"canary":"0.21.2-alpha.3","latest":"0.21.14"},"versions":{"0.19.0-alpha.5":{"name":"@react-ssr/static","version":"0.19.0-alpha.5","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"devDependencies":{"@babel/core":"^7.7.5","@babel/plugin-proposal-class-properties":"^7.7.4","@babel/plugin-proposal-object-rest-spread":"^7.7.4","@babel/plugin-syntax-dynamic-import":"^7.7.4","@babel/preset-typescript":"^7.7.4","@react-ssr/core":"^0.19.0-alpha.5+72b6b6c","@rollup/plugin-node-resolve":"^6.0.0","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/node":"^12.12.18","@types/webpack":"^4.41.0","cross-env":"^6.0.3","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0","rimraf":"^3.0.0","rollup":"^1.27.13","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-terser":"^5.1.3","typescript":"^3.7.3","webpack":"^4.41.3"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"72b6b6c604b49d039761ba88dca5fc3f47ed486f","_id":"@react-ssr/static@0.19.0-alpha.5","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-m642GqWqaIEhp9N9LvWzGxy1aG6APXULksNdSeD4uxIF0O2yzXV3vAcpWHYYxnxZh4pjzngRPu267xLEv37Ydw==","shasum":"2c0f378f48a77cb6be5c15fd37759f1da3c05db6","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.19.0-alpha.5.tgz","fileCount":11,"unpackedSize":23981,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+GDGCRA9TVsSAnZWagAACVgP/3T3+8aPm/etK+FWRDXN\nAb7eodCX6SfLOwCt5T7aTRwOuYt2woL77O7a4sj4saKCAqOFLoat5f+Hc3F4\n4xsWqkKtix3Ett2gTn8zHDYENQZHnSzferID2SmRKqMbqHfEpAVp0auWzEtJ\ndQxQqU7w1KC+O1FTshZBXhiFZPDgKUKnogPh1pYRUFzp1tZPWYTTfvQ03EIY\nwhQn+8MaCADviAC1Gp40dMCy9Ft+rxPD+TFdhAw7GSCmZETJW6gaiAK+Jc/Q\nJl3t3qSuiPtQJYyM01fLaDMVdBmKUncJgJuqYoL6kZTFOtv3EicR3q+OklAB\nMSU66O5bWbc4dB97DNoTrvHhzNm1vEjOF+cnLHB6yfgz0cL73kQWacGC6zVM\nqE283RyMcRcDK+ykv4/HILfvDHYy+4aYz85G05D4bjzmhMcKnXlNRyL8fptb\nszZkEaTQ0flehFtmIx3v2CeveFXqEeTHz0SdHh+/WxT7xEce9Uuxkj0aRIQ2\n7eztMtsrQ/6IBdPSyBGd+eOevXPCL0jlyyD9a1p1+7BMhL54fqFvAHI11Yky\nEd2xH9bvIoC8HOu2onlp9BOGg4K7VS4fBL+9EIqVHVlZr4be983Wv0GAnZWv\n2rErkZeBTRZ1GRJNBUvDYxJYce7tqGGsHdGLfOQ2feFt9FOyVsq3O7yUpGnl\n/5ZV\r\n=tYQP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCuVaqdXwg8M8pXhp9a2Z64+mnZ+ZblbFTA/TrSfc8tSQIhAOzf2KC3+DxS9Bc0iPeaQl9u85XnXWXWQJrzWUJfkHOH"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.19.0-alpha.5_1576558790329_0.494908693964905"},"_hasShrinkwrap":false},"0.19.0-alpha.6":{"name":"@react-ssr/static","version":"0.19.0-alpha.6","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"devDependencies":{"@babel/core":"^7.7.5","@babel/plugin-proposal-class-properties":"^7.7.4","@babel/plugin-proposal-object-rest-spread":"^7.7.4","@babel/plugin-syntax-dynamic-import":"^7.7.4","@babel/preset-typescript":"^7.7.4","@react-ssr/core":"^0.18.3","@rollup/plugin-node-resolve":"^6.0.0","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/node":"^12.12.18","@types/webpack":"^4.41.0","cross-env":"^6.0.3","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0","rimraf":"^3.0.0","rollup":"^1.27.13","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-terser":"^5.1.3","typescript":"^3.7.3","webpack":"^4.41.3"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"c3df72c588a83a1505a3725b769ea86ac2eb4644","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n- [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.19.0-alpha.6","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-bUI+iAJHefVm4SND7TMnhV3xJENOhuTRuE2Wwma2ofnQuXFzL15FwIC5vDdDl6Xsjvv+YsQP02nW2bMRGjSiOA==","shasum":"0c802919b444bb176568ad5b8dcf983373cb509f","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.19.0-alpha.6.tgz","fileCount":11,"unpackedSize":23964,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+GKECRA9TVsSAnZWagAAavUP/RQYdW1eoeQiYpvLD6wk\n3hspcLlIwInfsUx72ntXufl/EdF8KchMZTlRvh2VV+bQBzxZxxFPtQXPexY3\nLC6DJPr68owghhCMxl+HncpPTtl1cNHgnYyrBKY1JzuKJwDfHwQ2C0ts6jtj\nyoVBNeJtDsV2mPL9CAcIAk1VSujbVSRAUNJmHP//FIs4Qi5G5vau7jWz5UtI\nJdIT8VBVaxdHJ0uLsPa+UeVHgsP0RtCVUF9GnbvKqMHCLHcRqy0ARuAlrUfa\nSOclrbHz4w2juakl/4h7wDlB4aY3zTUzPAV3DjDuN8G1FV1S6/nrlmZWMiDe\nD1PIbQRAgP6KmypbYIzodXaTxpDvESOrROfA4KjX5feqrUWQOB4a3egBXRHd\nNOJZ9nK1bKBtq9iAB63E714MJPb6dzfvaKancFzTjNCbDAEBb6RT3mPZATVa\niCgRMPsCXszrumKb4/UnexHV1gm/ZPm0mmHg8i4UhN78zupL3ImQ2ICA2Ld+\nrzECPoWUWc2GYe//8zP2LIxfk2oDBl4uvYipWtuZE6uUBJzmZgtXCk82f082\nfZxUGoWRdihoh1BXfPc8b/bw690DakOhPS2oUk9JXPneuNEc5E6x6Zn1UQz7\nd4csr63CQx4WEScIvgj2NWzoRBAJoCBqQNUxsy3m/gidVlDLABz5f9uu9JB+\np+p/\r\n=4wGy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCOEt0wsqh6fJ62+qwLU3nhTEOD2sQ4nKsh2j8sJrLH5gIgYjIi+oaqHd097PtC18pE2VJepZ/c7oMjBMjeX2R/Ju0="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.19.0-alpha.6_1576559236413_0.28894236618685976"},"_hasShrinkwrap":false},"0.19.0-alpha.7":{"name":"@react-ssr/static","version":"0.19.0-alpha.7","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"delay":"^4.3.0","got":"^10.0.4"},"devDependencies":{"@babel/core":"^7.7.5","@babel/plugin-proposal-class-properties":"^7.7.4","@babel/plugin-proposal-object-rest-spread":"^7.7.4","@babel/plugin-syntax-dynamic-import":"^7.7.4","@babel/preset-typescript":"^7.7.4","@react-ssr/core":"^0.18.3","@rollup/plugin-node-resolve":"^6.0.0","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/node":"^12.12.18","@types/webpack":"^4.41.0","cross-env":"^6.0.3","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0","rimraf":"^3.0.0","rollup":"^1.27.13","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-terser":"^5.1.3","typescript":"^3.7.3","webpack":"^4.41.3"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"25cca467d3ef3424d743cb6f6f2ef5a4e8e25f2f","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n- [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.19.0-alpha.7","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-SQRRu0ovJkQRDBGJ4xG52uylB2wPHvISmMnaMBhcWij9uiprbms8wL5kLttMNDduGdtsrM5P+vlU91CcSgtX8A==","shasum":"9d1c15ba44af93d2ae14b40d1569c759cd513259","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.19.0-alpha.7.tgz","fileCount":11,"unpackedSize":24062,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+GUwCRA9TVsSAnZWagAAZ9gP/3h/Hf0FoCWPcQsvGlW1\nSgeZX1MxFaIYnqYISRQrl46LPppaqjwML63OTK5yFb24s5Wm7/U/c5shGtum\nIp9c44+HjqY1v+bRhcArItNXiclYPOzXYdL9u6h3SyBeeshSvVUCnBT3y/5K\nWL9YHNbudtpYCX6T70AJOIkrXoHfejkhMSjAiiI3VJMyh701KsbxWJ8NCueq\nqxfJOQKIGIXSy69KoWKcGKdRC6jVgs/J7UtYkXoF8TQ3XiAe8TkJeshOFuNt\n+cQHwc6++Tkz6OSqB3EJCAOBlLN1EmJFEs12QT5aRpGfBf/Xv6F2fZyFfIxu\nHfbf9KybB0R4vM2Kmp84WoJzHVrPEsPmBwPQrVVWny0UnpVoziS44PgjMIvz\nDW4UdVNl7iYYcV+33+fPCvMIu5kdxQ+0i/VkzfjmFj+xqy6p825+Va0MCvSd\nmSmiM9H24UC7X6Q3BepownYBdeedla2l+EdyAQuMnA6gwMspg59KJD+jMeu9\nHiFMeOYoIc64t56f9AGf6nEfabJZwftIxAwROpqIFswTdIWjlHLwJQk3xfhD\nLwvjFAyyNZsTKlCd0D2FxWnl6jFU38WHHtjHX1pvDdTCOGT3kSxzMOAsyCZh\n4kb4O39bc66/3Cuuex2/jMA3mha+Qb1F5n2F4lfjY8IkGG2PuIEeEuQkD4x1\nYUn3\r\n=++rJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFdYMkrRbfJj/9Ujb343QK5CQKH5WWCpB9EAZJmr4spRAiEA2NDgMbm9OhuhFviOT9HNaaOAyapM9tpG/LePKeG7/KE="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.19.0-alpha.7_1576559919858_0.363405905678019"},"_hasShrinkwrap":false},"0.19.0-alpha.8":{"name":"@react-ssr/static","version":"0.19.0-alpha.8","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"delay":"^4.3.0","got":"^10.0.4"},"devDependencies":{"@babel/core":"^7.7.5","@babel/plugin-proposal-class-properties":"^7.7.4","@babel/plugin-proposal-object-rest-spread":"^7.7.4","@babel/plugin-syntax-dynamic-import":"^7.7.4","@babel/preset-typescript":"^7.7.4","@react-ssr/core":"^0.18.3","@rollup/plugin-node-resolve":"^6.0.0","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/node":"^12.12.18","@types/webpack":"^4.41.0","cross-env":"^6.0.3","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0","rimraf":"^3.0.0","rollup":"^1.27.13","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-terser":"^5.1.3","typescript":"^3.7.3","webpack":"^4.41.3"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"6e9f4787e2aabbb6c14a9949e67ea5c8a8af454d","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n- [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.19.0-alpha.8","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-N8RE33QC3Z7KBfgaDA26T+knw3FREQeb64DK3m3K1mD1fvUyb1kXq6rLeFsJus+GVwu/sXWrZ7+o2JRCxqKBCA==","shasum":"6a7c4df3a5cd618e7d24ff0587fad7d7d998d398","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.19.0-alpha.8.tgz","fileCount":11,"unpackedSize":24037,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+GW5CRA9TVsSAnZWagAALwYQAJhXEltYstQuaUmUJfD1\namy+hyUMuQhtrcl5aNa/axuBJ+j4VRkY9/EtUSOP0yMZnjGUMgn0MoB35PYQ\nCwjiIJCYjjG1L73yZWXUW8khapvUYecjs1HsigReMczeRm2aAUAhYJ5q5mjU\n28jPgNTqCIDwaBRetYa3Jpv5r9tNk5qRrsiu6VD/0nmXG/afAg0gzJbH/iCQ\nBk4mi2h/KIqdgG/6veuCNWuru0ZfjhOkerwQ+bVSaShS2PKHdaL0TwSCvTU5\nt7azbSeqzEomOescWj278flhWEKgmCYjzKQY7SA+KBFVY0BXeiaqbEKdnG1E\nCr/3DgSEl6DIaIhs7BavERx2ikcNEiSl0Z2ofVTR3jHF9m7AtiPIBBDXp0Au\nf8YukLB/MzV0FbK05Bl0bwpbbukaUQzIZlkb8Xx7PgnS5YM79vt1FEVS/XzS\nhazuNMngat4i1bapy0R3kQLWaldjkpRJevC3Ze1/gexwlgEAFvB0m/YrCp4G\nC+a8kcNEgR8yxecu/JLnJUlLy5+f4WmBoGeEYSfBxhmr+vqS/VwbuGeXBS4C\nLKA/rZbqIGwCLOQuhgxmnCbkvFJgj8MpE3a9SGAkhaACSUcXM7mJCwgdZlEm\nA1i34bRUY3fdRNsBxQJx4RA+1Lartr+ctcsaz3FGhsk6lVMNREG3xPd2/05c\n/n5T\r\n=AInN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEhSkVMuLWsCOfeP1dqlSVgEVleX0oOTlPDk6CvQisj4AiBm3sDapPEWYC5utrIuCbRfUzjJznW05hhYLoN9DxdR8w=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.19.0-alpha.8_1576560057366_0.7551136862564298"},"_hasShrinkwrap":false},"0.19.0-alpha.9":{"name":"@react-ssr/static","version":"0.19.0-alpha.9","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"delay":"^4.3.0","got":"^10.0.4"},"devDependencies":{"@babel/core":"^7.7.5","@babel/plugin-proposal-class-properties":"^7.7.4","@babel/plugin-proposal-object-rest-spread":"^7.7.4","@babel/plugin-syntax-dynamic-import":"^7.7.4","@babel/preset-typescript":"^7.7.4","@react-ssr/core":"^0.18.3","@rollup/plugin-node-resolve":"^6.0.0","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/node":"^12.12.18","@types/webpack":"^4.41.0","cross-env":"^6.0.3","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0","rimraf":"^3.0.0","rollup":"^1.27.13","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-terser":"^5.1.3","typescript":"^3.7.3","webpack":"^4.41.3"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"58cfbfbdfef382fc3360ee7450fea5ca16e3a808","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n- [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.19.0-alpha.9","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-4HbO+CAaQXHYOdrYVtuHRGztY5u/RkmT1ZWgjETtCFY/8KMqY5tJ68/JtYrcujIhCSGc1LIfgOxVFyTuhvo26A==","shasum":"6a26ad176fb81bfb300290817233e7248af77f36","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.19.0-alpha.9.tgz","fileCount":11,"unpackedSize":24094,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+GYtCRA9TVsSAnZWagAARe0P/iOMbexr3D0aEv+b7+rf\nmO+xC0BVPeOWzRqt673E0vfnV91s/AAXUio9Q5iE9TDzCbr4SbV1yQIcucPh\nAqoRD/YOQ/chLRTl2Q/pY5c1FlZWElv8ej95ISkkFMEbSqFIfThNXLbHD0R1\nh4+XfiQPtl4ljePtlGfCmLCqI268Lc9OJ8dchubSBYmIAEzhLFXQ/h0WWUGD\neA00Xfgj7T6HcgeoJg1qIAqYIrz80TV9AcMv+Y1Gr5aw1DrhzS8A0WRtYOEt\nMuKUOc0kOjyP204ZwmUsPAZ7dkkrFA1myBoQoQnXp5FxdHSFYgJwh/V7NWKU\nkwwEjdHJy52/u22lxHjTd9bFfg+CpQdEnJr9fC9PN7lPX3a2POGV/vjAGDt+\nH0dhANhGtLH8+NrgnEnPauhNkExxPLeQX2XxBU0QDPKgcjgZws8dWFO3VRwF\nQcegS/8BMTW0a+QZGqRzxOXLkbB05wAro8eBUi/Ag3B2JS1plKHc3Bw4bv0h\nB118b1/WICmAKGOwrKLm2DP9UGksZZ/tyx6Ha3+qf4Rihr0RoNGLUTR1Cjkw\ntJcif3f5XJiM4O0LqkPFFROSkxNLqnHeK+i7sw8z6nqKtfFjNu0VFbOdtgG8\niNysSKlZI/uDpMUh0hkoffA2MP1CtpSjga8RCaeqIiSrmsrwZNnMU/X+R/Ui\nraMR\r\n=nr9y\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD1WwY5z8z0GV82v0KOF0dTmfXkD7TfrBrdDN9aouCocAIhAPjqiylG6p878n6LHqskznlRcAi3aN3NrTU/ytXbUTQD"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.19.0-alpha.9_1576560173329_0.5822655348704866"},"_hasShrinkwrap":false},"0.19.0-alpha.10":{"name":"@react-ssr/static","version":"0.19.0-alpha.10","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"delay":"^4.3.0","got":"^10.0.4"},"devDependencies":{"@babel/core":"^7.7.5","@babel/plugin-proposal-class-properties":"^7.7.4","@babel/plugin-proposal-object-rest-spread":"^7.7.4","@babel/plugin-syntax-dynamic-import":"^7.7.4","@babel/preset-typescript":"^7.7.4","@react-ssr/core":"^0.18.3","@rollup/plugin-node-resolve":"^6.0.0","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/node":"^12.12.18","@types/webpack":"^4.41.0","cross-env":"^6.0.3","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0","rimraf":"^3.0.0","rollup":"^1.27.13","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-terser":"^5.1.3","typescript":"^3.7.3","webpack":"^4.41.3"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"5b0ff5e4f05a52a9f52953799e200932e59fcfbf","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n- [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.19.0-alpha.10","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-SeZQoff/6VwTQ9rNO2TpS1VmTU4B4kNv2shZ6GPdFPw0/KnNRDoUYyjFG0S1ryHX1JFo23Bz7Z5f0CH1fjahzg==","shasum":"d5ae86aa7d920f1dda7d4a5298a39bdcd4c373b0","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.19.0-alpha.10.tgz","fileCount":11,"unpackedSize":24095,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+GZ7CRA9TVsSAnZWagAAAR0P/A7vI6Zc63cLpTanaRrh\nBbYY7hhwK+Wa4DDVu5XEgUCJo72yiTIVc1v2moTreXSMGStq3QxF8yL05wrr\nI66AfwJYqUZuL3j7InRMYmePiycZIdFT2v3gMG4hyooT6BVS7NKMI1sdp0ZH\nE3liDw8NV4gYDs5DMDBimLaG8OAdxKVBw+jNY6/Lxabo6wiFeQdWyaB7iHTM\nk3axuTW9ZDoBqlhDEvaf6QA+A9hEjTHT5wPyQgAdZ+XA6Ux6VhqkLNR7WCk2\nkEptlPhyZoEN6lomu4twFo3N2m+7J9weDezReW8vkHeSmcpiOI4xrCUJ4iJb\nmaKQf3iLrjCCsEIBHhsZOzOa/3ArvMF8I38kUKyZ+tL3j93vxfz0ocXtl7OL\noCj2uSBfIn7GASKTxV++TGfQVfB7UhPkG2I6o+ErAf547xbmTe5XEHPOfrXH\nB0+uq8zTRK+BCc0KnThlzBUcPik4H2PHC0eNHfQAZckkV+9fh2LTh0Qw6Y6B\nnQcRSce7X6Q0fNa7sG5K3Aj5YpFC3PKp0dq2fekPgJtRYFrmdj3YVpzhWS51\nMAz7gVw8lssA781f6qjgHUeCh4Nzzvwqv2oRa5VYk6yb40dOJw5EgDNipbKI\nsERE9ByrfOa7e6NM8qemjUed40X0nksiKnuAyi9yW+vBLa3ey1WozaDXOgWC\nnxfm\r\n=qHjC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDiejAO0To6BZ4eUaaf2P0i33tO8qPG/TlwXTDcpGvCdQIhAOSYrjR6Y1v/5oR/j/DIAfVD0pntwCQ2qHEDSWfRiDtR"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.19.0-alpha.10_1576560251244_0.6759136777726276"},"_hasShrinkwrap":false},"0.19.0-alpha.11":{"name":"@react-ssr/static","version":"0.19.0-alpha.11","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"delay":"^4.3.0","got":"^10.0.4"},"devDependencies":{"@babel/core":"^7.7.5","@babel/plugin-proposal-class-properties":"^7.7.4","@babel/plugin-proposal-object-rest-spread":"^7.7.4","@babel/plugin-syntax-dynamic-import":"^7.7.4","@babel/preset-typescript":"^7.7.4","@react-ssr/core":"^0.18.3","@rollup/plugin-node-resolve":"^6.0.0","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/node":"^12.12.18","@types/webpack":"^4.41.0","cross-env":"^6.0.3","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0","rimraf":"^3.0.0","rollup":"^1.27.13","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-terser":"^5.1.3","typescript":"^3.7.3","webpack":"^4.41.3"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"2f332309b5fd992bb4cdf41410685d9836b4ff2f","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n- [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.19.0-alpha.11","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-bk/egOHAJc1g7c1psKDrGTqvbbeNWtcOpJfXY6AF9NwV0MpLpwQ4qoEkoWEGMEUiuwvkPnoZji6zaLFdO2jH8Q==","shasum":"8e8c343eecd633b85acedad7d3b3aeb74433a1be","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.19.0-alpha.11.tgz","fileCount":11,"unpackedSize":24168,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+GeFCRA9TVsSAnZWagAAYZMQAJY6I4m76g7GKzZ99IzH\nofK21fyej9KcqSIjH9C8nsKuSF2v3QPwrRFdaABrwNFkE6GDqy+CTjFjLr00\nB1Iuukmt0O5BuIdnWuQN+nRBY6XvcrEMbYZ9PoWrKp6OAiT7zixYL3uXg2vA\n1x49+qfifhIgeUu2zGDVeb7gp/hU80VK7R5DF0oYAGPj9T+YSBaGL/z573cN\nae/1qZOfQQnxUumV8HGnWsWq+XviSiQ83nXSsogI3nZwg1R44gOyqL2fGjht\n3t/b3tpYHJym0YdYrCNTSXuOvTWIQxQBPyWm1CS9ZlELSv3dfH9d9O8vke28\n+qkuFN7e1um93ZE7tb/R13Qx+mvgu/BSfM7Bf7FAIqeSzgpstOiz3kgmMaPl\n4MH46iuAVTafvm8G8U0uRcX56fBZAextFmQVfjJT2VytjAtHh7AUf2mv4Uj2\nVHRH/flxOP3gqt8o4VkUrBG5BowugMmJn3/maTTEq7KZW9ybSqneH/065CyX\nCgzZyzyiLfmlJbVGQ5yG/EfZOFCHi+KDHPStJpKvzNTVSngIRcDYXMREmf5v\nG+kUifyN5YiweHYEbNSc4CrSEtuPc7e/EpASjj3iiWt0HK9QDl+uzkoPdZI5\nZvj3CH5c1//t9iMcecUVVMzE/tZQabcxDf6wGketb9HdGokYuRGYPkH43jTg\nbdxQ\r\n=+7sh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCa6IYPbA5EPFD1yRdKGjng/FEMAvXxBV45t0DniChdDQIgM0+hYrcoeDM2IqeUQelJdXUCoClEo7ErxhijY/wYXrU="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.19.0-alpha.11_1576560516836_0.035631754667986515"},"_hasShrinkwrap":false},"0.19.0-alpha.12":{"name":"@react-ssr/static","version":"0.19.0-alpha.12","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"delay":"^4.3.0","got":"^10.0.4"},"devDependencies":{"@babel/core":"^7.7.5","@babel/plugin-proposal-class-properties":"^7.7.4","@babel/plugin-proposal-object-rest-spread":"^7.7.4","@babel/plugin-syntax-dynamic-import":"^7.7.4","@babel/preset-typescript":"^7.7.4","@react-ssr/core":"^0.18.3","@rollup/plugin-node-resolve":"^6.0.0","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/node":"^12.12.18","@types/webpack":"^4.41.0","cross-env":"^6.0.3","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0","rimraf":"^3.0.0","rollup":"^1.27.13","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-terser":"^5.1.3","typescript":"^3.7.3","webpack":"^4.41.3"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"53677dd8723e7a5953ec39787c06ad4b5628b476","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n- [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.19.0-alpha.12","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-9IA/gtxl7AgZZvbVbExpap8zXodhTiI2ZdtRDxcC14oUVBFMdAqwLmzi3fEksXq2cRZbvEnMStCcgL9ji0d9/A==","shasum":"937891af43ac935de40e4640ee4edfa6f94d7512","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.19.0-alpha.12.tgz","fileCount":11,"unpackedSize":24327,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+GjlCRA9TVsSAnZWagAAfHgP/ipJdLVgMWUoH29zXYWz\nA/qLkN5FyccZDntVVHBdntmmVL9eCkY6QyFltKyIF7gUpK/JylnZhWTRTMY+\nRl6Cr7xiyngKILcsk/kVgUVZohkcp3y9j7Qv9nV2q6YkmOhXffzjaMVRIQAh\nvEp/nubRwQV2/NA4AdeVaOWe/N2znReQV+MzjKKVqgS4lO0DuUlyMEdXtYM/\nim38uA37F6AqtocqF2bqPOMi94Ng/bcXfI67UlV3OgJM8xg+mA/6ozjRL7JV\nBetUXK87QnqAMi8e9Lz+eqCCfT7C4mlgFhnLnswwk/bqIWVorz8CfsHyiOLO\nbFOANPHpmWXy0qLxdi0tIuasuyoAhnQv+jCVrFYZy4HNgt26lotpBkknU7/N\nErpn2ntsRK6MItULimTjauMzrAkWcx1Bp6L851ynvAQ5OZiBnGV8SVGnV4wF\nAGR/tkhwiVrTCz90/MKxMH7xha3ncplhJGNgsgqCsdxYp/4eBC0hE2cXsr4z\nNR/6IOHZnKohnxVJ+k4O0QZmnc4igIHPo/NKXe7gefKrjxwpFkX/olrT4uos\nOrs3S0GZBOO7Q/4ojm2E5swqQG0oAVlD/TOkwajEc7jddXorZ3qWg6MZfNIA\nUzBQOH5tSeDB6ZvmWwOe/dDJAy+3cHRAcBvQ2dyDMtVgnjQl5Vlojuq0sjvT\nIZDT\r\n=03gf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDBbL0ISR7em4nYgfp9T54WXLBWS/a5A7sNB1OxImndMgIgXqBfqmjUmZPB5Kb+IMRs2OYD+grmUFNxQ/LAWl63moI="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.19.0-alpha.12_1576560868744_0.6640613227792596"},"_hasShrinkwrap":false},"0.19.0-alpha.13":{"name":"@react-ssr/static","version":"0.19.0-alpha.13","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"delay":"^4.3.0","got":"^10.0.4"},"devDependencies":{"@babel/core":"^7.7.5","@babel/plugin-proposal-class-properties":"^7.7.4","@babel/plugin-proposal-object-rest-spread":"^7.7.4","@babel/plugin-syntax-dynamic-import":"^7.7.4","@babel/preset-typescript":"^7.7.4","@react-ssr/core":"^0.18.3","@rollup/plugin-node-resolve":"^6.0.0","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/node":"^12.12.18","@types/webpack":"^4.41.0","cross-env":"^6.0.3","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0","rimraf":"^3.0.0","rollup":"^1.27.13","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-terser":"^5.1.3","typescript":"^3.7.3","webpack":"^4.41.3"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"dd98da7d39348e2f61851f4095f7033e955234f3","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n- [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.19.0-alpha.13","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-WFaaLtg69WTKabWvAKYR0+zbIe3NIVTuQogQN+sJSJdXRWQceY+Fogit1rHde8ADHvYhSYLu+gbVUDDYCqB5MQ==","shasum":"d91375ac9a890e27658b204639275a6dca82c496","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.19.0-alpha.13.tgz","fileCount":11,"unpackedSize":24303,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+GlGCRA9TVsSAnZWagAAjkgP/36gDjMeSQJdvcBo0f8C\nmHU6xiWAqsUoeaDREo940tYE61pVzcR4E/7IikvOnZdfLGuF3c07XX7G8a9P\nAafa3+VaSnMWVC6GriaRLK9atRrkI5HfRpC8uXdqZGlLwUFdeP/LEBH11cTz\nfU1VdbggS2AMmF3bBBwe2qk0WvJwAVV0JHhXlRm4xz5B54Zjk6vURCGyE6PC\nRLfO4tDs7ZVQDXYKbQZfz7lJBI0Thk+BXHMCDubY03arv7B74KEPDk0Qy3qX\nWhUYkyJJnmy2djBcPAd5o8QXVdHmuETrWUut+1z8BKZZ7kM19YtacZ9Udfo2\nlLkCyUqleZqy1XzKuAkYhWj8pNzVOV6F9Dn4SXPhT5eyMo6ZO4l3dbS5fcyP\nk1kgUlGIlWpz1QQZPoBmaqZpEEwuoy79dREd4R4VoBT5ahl9bkFfuMgc0KD6\n+Uo/rtCsxwUqobVm233jY4vdKmUk5hkAH3iVjcRnVzaJsWDm9Sn7zThQebcD\nERet5XoHuZ5x8SY2cyefH4H51VSKKmz43SJM/F4WLLItSKxUxO8fz9U2mr14\nir57dm5l7AGGteWH2rxKqHzPOZOeo/Vuyfxj1SD94nPI4GZBK3W+k6mqY1+r\ncjPkXKM7Gi3J7ACq/26lVVPXBK0bQ5xQJNpP2i+3N/0RHMEIhhb5wqFXI13u\n+At7\r\n=peKF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEjsGZQEm8835jJ/QEcwq3RuEgbKcQDMARITet/QsS9wAiBSaz65iXuzYSc6g5D+MB6Fkcc+VDho/H6eWBetZ/Qb2A=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.19.0-alpha.13_1576560966151_0.44163842083304616"},"_hasShrinkwrap":false},"0.19.0-alpha.14":{"name":"@react-ssr/static","version":"0.19.0-alpha.14","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"delay":"^4.3.0","got":"^10.0.4"},"devDependencies":{"@babel/core":"^7.7.5","@babel/plugin-proposal-class-properties":"^7.7.4","@babel/plugin-proposal-object-rest-spread":"^7.7.4","@babel/plugin-syntax-dynamic-import":"^7.7.4","@babel/preset-typescript":"^7.7.4","@react-ssr/core":"^0.18.3","@rollup/plugin-node-resolve":"^6.0.0","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/node":"^12.12.18","@types/webpack":"^4.41.0","cross-env":"^6.0.3","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0","rimraf":"^3.0.0","rollup":"^1.27.13","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-terser":"^5.1.3","typescript":"^3.7.3","webpack":"^4.41.3"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"39ec9a1bcc414d88ac058e3a5fbbef79f09a894f","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n- [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.19.0-alpha.14","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-ot+NZojR4Y5KLbtcTHuqePaqms4SPrbY2Rn3e+6Iha1aS2NROoEZ4i4lUK8/9GDJcm+VG9qpMOkuH1R8XmjXKg==","shasum":"ff35e9b8004254815b9598050d764d0a430a194e","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.19.0-alpha.14.tgz","fileCount":11,"unpackedSize":24414,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+GodCRA9TVsSAnZWagAAP0IP/3gMG9PvOi6GI6yAwm5n\npCaa2z6QuEhHbQ7WtL00cg9HGhtKjR+Z4ns6QZdeGEuDiDKKWXtXHRQfkAhl\nWJ2S7vqWHn9fAwKEqfvIy3JqROHRKsss8trvxpave1AD3frrPGtQrKSnYqZJ\n/Ql3Uck6GepwBq+3sHqxQ+mByamPb4+KIMXe3EGl0xJ2yw5KRvUSCYKrbpUf\nekg2O5jelTPFY7q6hv0l1ZpLwugTLJXdQtBO+lP238Hg6xTegZePPxplD0yA\n86ZQuyqsA0iH8epMYdRDofCiiK5qYoLFeLryJGTs4UqLUHFr8I8e75mme4ss\nIqqm1dAB16O/wVUx9fwdYSlR9R+kzckbW4qx8+FLc4NmqsZ2eoDAxCKsI0y/\ncV66049kiuoCWUSD6DsqOHomIcpYSWGRgQsWTkBSfBCm5JUNBQdKJhAl9ARS\n6VMLO+2r5sdlwDZcBt+dR4bkJ/3+xfkJcxfq0hti8HuvtTeheP+TYJT9RtPy\nrbIK2miraPz39AaSBlqNcd9tH4ADUtGj5m4JJSHafolTQmJa3VKD4G1aCLb6\nZn3cm6GVk4OxdxU9a8ptMSr5YU3SK9jZIkBftRbUZ9JG/py/azVe0ayCB3Za\nn3GvUi82F465w4979VvfZVMxI7z3Dozn7+16WkCLiacJfr/j5mVrKIZZVvvL\nPiJw\r\n=P5ji\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEL8MVnu6sHVlKxx/pbq+UUkmVmfmAAiGKeFXYd4c1mOAiEAwo1fXWxX/d6nmbttfCdTMKR4MON56+Khm1Par65ukUs="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.19.0-alpha.14_1576561181395_0.3358794499914177"},"_hasShrinkwrap":false},"0.19.0-alpha.15":{"name":"@react-ssr/static","version":"0.19.0-alpha.15","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"delay":"^4.3.0","got":"^10.0.4"},"devDependencies":{"@babel/core":"^7.7.5","@babel/plugin-proposal-class-properties":"^7.7.4","@babel/plugin-proposal-object-rest-spread":"^7.7.4","@babel/plugin-syntax-dynamic-import":"^7.7.4","@babel/preset-typescript":"^7.7.4","@react-ssr/core":"^0.18.3","@rollup/plugin-node-resolve":"^6.0.0","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/node":"^12.12.18","@types/webpack":"^4.41.0","cross-env":"^6.0.3","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0","rimraf":"^3.0.0","rollup":"^1.27.13","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-terser":"^5.1.3","typescript":"^3.7.3","webpack":"^4.41.3"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"7fd53564e2610957c05b50efe06911f20724d556","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n- [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.19.0-alpha.15","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-BXpKm/RvQslk9+NbXiil8JR2Oyh1rJpKehqUVXv5TJPPQ21pEAvdSozzt0QWdRbHzentUozdRkjXInwktKgvjw==","shasum":"2d2c33644899aaff426dc06ab28b3898d6750c94","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.19.0-alpha.15.tgz","fileCount":11,"unpackedSize":24633,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+GvBCRA9TVsSAnZWagAAw+gP/it1xGzdDZJDk89xVemG\nzSAobyfZefr+d6dfceezZo48qbHculd/C72VLPQapATWaegZ+NrCZj+7AEve\nLnroG6aDHP+F03GHwIYukhJ9vFB61bXc3wuG4ZsnyRITw9lGaO2C8WNpaAzX\nNNlCYC9zqd/HqkkxyOpLS1wwVAph0NrgY1GpIrTkhwWukwUSOtqhY4n6cq6c\nmLWsFOP/dmdimGsP+g8qYRTqNnl9tFM/MoRhzNoMv6EI3YnXU1l1/r3p2ur6\nHqrwsAfxb7QJSbbXiV0TU+H8srE5keGVGEY240lE1i+9kJ0YHLAg3ScC7RZb\nufC+wsXqhLidgnKY0IH9IISnN+/v8xDj1F2xT1Oxeq4wCOe9Bcs90CJlBPcf\n/OmXT/YqTpDOPKp1XaQ0/J3ibd/z/ErcHCxPtjzM6F26nr3d/oEsrISCyg9Z\nq6t+7/Z5MOdjtXf0UgzFOSBmkV3xKcu1wiNHr6vLhXb5oDDnfuLbwapT+EeR\nIe1dlcWpe18dPITSmGIX6PwZcOBejhbR0kc2xm56lbzg4ZaG9DN4dfvYI94e\nhEbYrH9OM8PYtjfU9dy4QK8zwvOCFMsFWXIEPAhI9CxF37eENtXNJzC5fUbL\nQX96rFq1460DlAuu0bB2S3uVm+JZ7MEGTbQpHN7ZClhkSMrJ6S/iyg1VCX50\nigOO\r\n=jlZp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEoTtMPWB2tZX+bbZqvDpkrU/wzXvflNH5RANHZ9rq4YAiEA2WqiEPTwqeXBZO8JtATfcsf6GX5RR83uZfIgmv86ipk="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.19.0-alpha.15_1576561600500_0.8567155818664425"},"_hasShrinkwrap":false},"0.19.0-alpha.16":{"name":"@react-ssr/static","version":"0.19.0-alpha.16","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"delay":"^4.3.0","got":"^10.0.4"},"devDependencies":{"@babel/core":"^7.7.5","@babel/plugin-proposal-class-properties":"^7.7.4","@babel/plugin-proposal-object-rest-spread":"^7.7.4","@babel/plugin-syntax-dynamic-import":"^7.7.4","@babel/preset-typescript":"^7.7.4","@react-ssr/core":"^0.18.3","@rollup/plugin-node-resolve":"^6.0.0","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/node":"^12.12.18","@types/webpack":"^4.41.0","cross-env":"^6.0.3","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0","rimraf":"^3.0.0","rollup":"^1.27.13","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-terser":"^5.1.3","typescript":"^3.7.3","webpack":"^4.41.3"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"a005cac6839f340ce5b295aed20300c854aeaaa2","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n- [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.19.0-alpha.16","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-M3Yy33gF8Bov9AKklS35CZt1OXjpTqj4t6fPqGyEV215D/0s6L32aFliRZ+8fTw5UBXSu9iUtmX6nC18ajnhGw==","shasum":"9434c5d8aae126f675bd9015296f71eb517cec31","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.19.0-alpha.16.tgz","fileCount":11,"unpackedSize":24654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+GxGCRA9TVsSAnZWagAAungQAIEvBAgLdBLd/3wyIXWa\n10/7UNi91ceZ+8JyMsZPtTd/UAztSszoRaEsqJkEYmj3S8iYPuBj0I3TY4CD\numbjxg7Qg5auJSnWe3on2ccfw1MuS0ZRI8k1BZ5Qmhf5Ys52znOKmH7jyp0J\nuFbKQ/5R+9gfmBOdJ8ZJcxs57CClHxgzDNDaDpMNg2TD1p1I7D6Ry/arqBvK\n6cvN4+JZwSc6l/nuVdpAPbDw5Lr+va1+Va+2lbzlO9aDJzZIuGHZFVFUbyCY\nSZdB0awYHdSdN+P677LWGAVumBfNkJFrpTufi7JEn2KhFx7srqFQD1PydADx\ndFrkyAfm0kW5lMfhmf1TFG8olXHpSPN+3zW2o51BidQnE6tH/zcnVD35vvB1\nlZDVcxksSKqVzVTeaBhvSiIBAor1YN1N7YgCsvv0MRGiTSIqTfYDOtLUhvuW\nRSmIDk4UkLQ2eC11YZTviuBdERFMpY31W7nfan4L5Sq5uZYZIBOPTy9Uhpir\npDkIGxue1W/+GlCX670i5U7ta57SOMzLF3yttgVqR9EVbD98loFYiZ2th5gl\nAxWci3lBe9rkbzrNNenMSkJykgoIZ2KAPJq8e0Q0VDd7qn3gbchyv+JPhR8d\nqBdmMM1WLtz3x8YaMBHNNPt9EK9hpqJ6EvlfPGi2MZO4hpRxTgqj8GR+Cgo3\nqlWi\r\n=8LYS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFIVU2tg+tXRY5rNg28zoe1xSABkTReGrvkehAruIk0SAiB7IVuO6cO+q8FARWAcGIeeOrVCMFLkL1k1KaB5dlVSKQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.19.0-alpha.16_1576561733860_0.15693220695057786"},"_hasShrinkwrap":false},"0.19.0-alpha.17":{"name":"@react-ssr/static","version":"0.19.0-alpha.17","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"delay":"^4.3.0","got":"^10.0.4"},"devDependencies":{"@babel/core":"^7.7.5","@babel/plugin-proposal-class-properties":"^7.7.4","@babel/plugin-proposal-object-rest-spread":"^7.7.4","@babel/plugin-syntax-dynamic-import":"^7.7.4","@babel/preset-typescript":"^7.7.4","@react-ssr/core":"^0.18.3","@rollup/plugin-node-resolve":"^6.0.0","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/node":"^12.12.18","@types/webpack":"^4.41.0","cross-env":"^6.0.3","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0","rimraf":"^3.0.0","rollup":"^1.27.13","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-terser":"^5.1.3","typescript":"^3.7.3","webpack":"^4.41.3"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"a2091cb8753672b9e50a80c182e5075a14af5759","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n- [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.19.0-alpha.17","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-nz+LEMzbowmXf01mbyA18tOT+NJRw7wJ6JP52arNTbJ2F8Ph694llY1RCBzl7fTRGJpTABwwk9mhtX11PeTEaA==","shasum":"e38d52b13f687bb026f49e0e354ae3e0adae1e9b","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.19.0-alpha.17.tgz","fileCount":11,"unpackedSize":24685,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+GzVCRA9TVsSAnZWagAARvwP/0wKzj9f/shv0p5/ufpM\nLGP8K+KIQBculy0okxNK0xa1PkM21A/l0VrNI+bQHdvfX7U8i+GziJzDHVsw\nHsaVweqMdKV0cnAVupY4kupNNouRa727ND27jdTBnwFJTkr+6mTTZK+pA3VR\n46F7WWkAFcQzPYFS2oopt0dk4NbJYCaq9MoA7Jn2T5DvgyH/Q2aB2+GyKyCt\nOdPWbCTy9zsj3fZCp4eKDm8GszuVTWiCrn0tp5AFl01yKJTs1yUnjLz7J4Pw\n6ECtN+0k1k2epBltF+A5inwNpwGI1CLpRG7wZ+ZqXr85MykBaCnU4JyizMmX\n4Szs5LZf4LL5/MJgnCtmqFHW0nhs+nBZVnYXfPiRoVNTkpvBG53WHpZtx8uC\nEOQOpMMXckHZtBOarehVop9f9fbytyKr+ZXJT7VnD/nSHSZCumKTow7pRyoE\nY4uu/YxrktmZFLWTBbfhr8L/kGLr+NLCaw57RcuhUnge2zIs6hAk3l3mQYcf\npmSZeZqQRtOnf2w+NQUSUprpDKvyWzO/7EHPZwLMgvePJFnbU6JKZcytOe+T\nI97QMJo39VZB7gsPfT6EIPhJe+u3EdkSZ/ONljVJzE1S6Uxvnl8qZfQ9L/UK\n3U7gVbI03qpI3yBO1AnrFKSat/OtW5Og0uT2GJPfngan8eNlc4TgQ4UIV0PX\nRgKG\r\n=h1tr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF4KZaVmKUOSpmM4lo6wG67B38PaJg0H49ditIoHgPJ/AiEAv/udmRHRhS7tOw3IrBkXqy4Aso9uhVWON4gHTkH/F4g="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.19.0-alpha.17_1576561877030_0.0057848191769309665"},"_hasShrinkwrap":false},"0.19.0-alpha.18":{"name":"@react-ssr/static","version":"0.19.0-alpha.18","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"delay":"^4.3.0","got":"^10.0.4"},"devDependencies":{"@babel/core":"^7.7.5","@babel/plugin-proposal-class-properties":"^7.7.4","@babel/plugin-proposal-object-rest-spread":"^7.7.4","@babel/plugin-syntax-dynamic-import":"^7.7.4","@babel/preset-typescript":"^7.7.4","@react-ssr/core":"^0.18.3","@rollup/plugin-node-resolve":"^6.0.0","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/node":"^12.12.18","@types/webpack":"^4.41.0","cross-env":"^6.0.3","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0","rimraf":"^3.0.0","rollup":"^1.27.13","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-terser":"^5.1.3","typescript":"^3.7.3","webpack":"^4.41.3"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"b7d3056453c252e1b8b1d7c79726c0bddd289c54","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n- [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.19.0-alpha.18","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-vIaFb2zjkZM8ftdFIDfqNtczA0FfnJZR9KNm45YDTnyd84AQ4OBsMnAZRkvN3zp4m4iGKHrWVCXtb+PJITc5AA==","shasum":"c18481a3746ce8b4ca07c504091efc27f6da2eb4","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.19.0-alpha.18.tgz","fileCount":11,"unpackedSize":24685,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+HCiCRA9TVsSAnZWagAA1OgP/ikMCG3KISboC1KIJy6M\nKt0WB7rqCU9fXCtZP1EGX1aYbcETBowsLG0ndCnmbxb/rVuA6c+dpO/qFS66\nj4Wzh3MkniyL9YkvMPPn/amB9EJI9rIHklehCc9bQuyqdoC0mPXfmfyugdpJ\nk0wygqhl5beXaZgTZhTRicpHDdR5de17S5GMaENhIKKSVChtbXoo9oflQ3nR\nSHXU20/1dzT+XRT9f2tJ7OWFAd09U49AoQYWhPojm3Xnvo0hGf7JLjeWG4oU\nCsNzn1+ZdJcsrDswrZgFfZSjN9D0vme/qX7pY3mrUx5u1RWxkR7LRt1wiews\n/Tho0MrGUPXiX0wqSFXV+Zv6dAv1fJk3Kl4g6BFIyS/rzNPWaJ+57fEVk+Ao\nEi9NaRp6mPb4KAWRH3cMlSJM86HnS/euBrgw7N30yP6pK3usCWu8tUAeziC9\nom4N/JUR5PKUH/IP1lniG8UW6Px3a0QsuxdERDcpzA6l10cxdPNr4g+ZF3o8\noIwBEqUaDvOmqGcdhv9u10lKVY6z1C5Z9veTF9cZXsrTkK44A1YX6tLxfEoF\nCYDHcmD7+ua7OBIaqEL8/5hDf09JmaW5AmgnDO/vLo6SYo+Gr/GxiJxIVMSk\nhbxXehKBa/UK8yUDSFNKKgni7X13YtDB8TtUjncgFNr1Jlyw8YwuYI7S+m1/\nL/Wm\r\n=70ZA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC1o3boaZhWPjRMRmoXDm7toI5U1aYocQr9TdAckPP+mAiAUBAQScYLzYNnUpeODb9r8ckFOtgfvMavyyXltgMLnaw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.19.0-alpha.18_1576562850135_0.015995295409990673"},"_hasShrinkwrap":false},"0.19.0-alpha.20":{"name":"@react-ssr/static","version":"0.19.0-alpha.20","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.7.5","@babel/plugin-proposal-class-properties":"^7.7.4","@babel/plugin-proposal-object-rest-spread":"^7.7.4","@babel/plugin-syntax-dynamic-import":"^7.7.4","@babel/plugin-transform-runtime":"^7.7.6","@babel/preset-env":"^7.7.6","@babel/preset-react":"^7.7.4","@babel/preset-typescript":"^7.7.4","@babel/register":"^7.7.4","@babel/runtime":"^7.7.6","@babel/runtime-corejs3":"^7.7.6","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.3.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.0.4","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.8.0","node-sass":"^4.13.0","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.0","slash":"^3.0.0","terser-webpack-plugin":"^2.3.0","unionfs":"^4.2.0","urlsafe-base64":"^1.0.0","webpack":"^4.41.3","webpack-dev-server":"^3.9.0","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-node-resolve":"^6.0.0","@types/cheerio":"^0.22.15","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.0.1","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.8.0","@types/node":"^12.12.18","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.16","@types/react-dom":"^16.9.4","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.0","@types/webpack-dev-server":"^3.9.0","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.12.0","react-dom":"^16.12.0","rimraf":"^3.0.0","rollup":"^1.27.13","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-terser":"^5.1.3","typescript":"^3.7.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"9193c875a522b4c0c083746df1a1f7f92d913b66","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n- [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.19.0-alpha.20","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-Z+C1GHWhhn76gBn2SwLNmr7W/+db8Up8/RrmFkCIN6Yjp/Dkju1gjRGuoA6a50GL6Ryhnj6TQXT3BQM5eOVIbg==","shasum":"ef017837f63a7c2cf5977ecf3f5d6be5d1928245","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.19.0-alpha.20.tgz","fileCount":43,"unpackedSize":326635,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+JQaCRA9TVsSAnZWagAAANwQAIxrKMjF1yRPqwbpJ5jN\nfm7xN7cAYtBh8qV3Hs3Sjtty2sVf7lcu5qpgjz6maRXF3JExuOTGwvovxZuI\nEpAvsp5guhHdMsmm9wh1a1vT6O/Mcfq3SV0RAdasoN9qGX7Jp7AfSLUDG6hd\nAqfnxUyIEU9V7BwwKzP6J24bfJRvienHTgnccWi5YRA7hCcKz9m+e5rg9qaP\n/N22DAYsuQRSBEa3cKLbbiHvd0n0aXTloZWkjJLkZLhQU6byC3/N36BNChz8\nXqUt+hzqmpRqzeLJrSIFSebpdPpBgiXMC5xu9DALwxfciHBewVmRkmHeMT3n\npwSkpQCs5XOX0Jgq9cd62Hg5kBJoUOHMN6+/vfsXenGX6uG4MtvGZ8tvnYmN\ncSy49QX0GmrlqI+Mdoh2bPmxoO3harP6BHClPzaDmX6x6hxM84u/Off9KYSV\nm7S/nmrwQJKhXXuNQq0tVn+Fmnn58fXc0DWeRmZVAgOKAI89RAGw8sXw10fR\nXTWmwU/T3G56U/m5KnoGTIGzzlfL1OLsP3dHU0A1tq8+knGxOl7awCmF0hyf\nQXhaSPMhM9bYO1K4EhuQOv9iKnPpWLu3RdeAdiPQC+YZpPu5gqN9Y6amsdlf\nd6feLRo19mt3RAKdsjHOaNNNc7oqfGmQ45Ms8Li/D1NY08A9f7knLsoHWfMN\n8euM\r\n=4aqe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBEMfRbn8eFSCl8IMB0u9T5BjQ3yVA/fU1gIbQ0B6d56AiEAg8RPzud8qL3y35kJEvnfmM7gLvARlr2Ypu7OKwR0WeQ="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.19.0-alpha.20_1576571930024_0.44100647999051446"},"_hasShrinkwrap":false},"0.19.0-alpha.21":{"name":"@react-ssr/static","version":"0.19.0-alpha.21","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.7.5","@babel/plugin-proposal-class-properties":"^7.7.4","@babel/plugin-proposal-object-rest-spread":"^7.7.4","@babel/plugin-syntax-dynamic-import":"^7.7.4","@babel/plugin-transform-runtime":"^7.7.6","@babel/preset-env":"^7.7.6","@babel/preset-react":"^7.7.4","@babel/preset-typescript":"^7.7.4","@babel/register":"^7.7.4","@babel/runtime":"^7.7.6","@babel/runtime-corejs3":"^7.7.6","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.3.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.0.4","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.8.0","node-sass":"^4.13.0","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.0","slash":"^3.0.0","terser-webpack-plugin":"^2.3.0","unionfs":"^4.2.0","urlsafe-base64":"^1.0.0","webpack":"^4.41.3","webpack-dev-server":"^3.9.0","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-node-resolve":"^6.0.0","@types/cheerio":"^0.22.15","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.0.1","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.8.0","@types/node":"^12.12.18","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.16","@types/react-dom":"^16.9.4","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.0","@types/webpack-dev-server":"^3.9.0","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.12.0","react-dom":"^16.12.0","rimraf":"^3.0.0","rollup":"^1.27.13","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-terser":"^5.1.3","typescript":"^3.7.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"bed76d4f9df9d93f081981a47a8f083bbab490bb","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n- [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.19.0-alpha.21","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-4SWpbScMjEObJloM6uP2TZi49Lo/gQe66WU9sSO5Gs4Dv+ToBkGP3NSI6H1JzmZQVpf1I07lPo8TChEE14J5AQ==","shasum":"3392f7656a38815bc3331716bc7c79d847832a2b","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.19.0-alpha.21.tgz","fileCount":31,"unpackedSize":261080,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+JUFCRA9TVsSAnZWagAAQdMQAJRsxWX+i4yvn0AMTP80\nbssTj7txU+ZfoCNsDscYFyY87XrNa8+Zi7FJTR7/K/PDMeTx8qiEwTigjKhJ\n7v/MzwS3smP/508U9RXS501ebc2LO26r2vL51maCTOfbGPuDMac/5xWMfT0C\nbU2KxjJ+Gz3/Zy73qASFHaiJlE4+yxfbW2CS80rfGcyjhFI0CFCwxdvwliE4\nMbO+vw7Rqfai3ucPdq3pOc9s+EFI7Oj0deiBTAT7yc7LaPf0LrrosbdwNRzp\nbmKAbB+Bbg0pcv25TlLVdaWZi4CSrdElFoamBjiVKvzLoV0C60Z7Y9slhN2y\ndfHGzAoSNlC3PGyBSLBHKcbIBOJxrRAlLCXwXZUJf/mlJ+XhonrcqYmEIJ9M\nwGUHKKENS+LMEPqw75pHplDYMNNZTdpL/TVyMgAOZo1KT/vXE+dLjOEz571k\n0x0LK/PkrZo4QSBosGKW6sYfKxwYtbQZD03xMcpbEn9Jg3xKj+FfUaWfUZbv\nmt4tGRjVLvOP6yuobflQJoIEbxV8ZSa4ESymg13LgWQORmI1T71KbcOQomkZ\n1tkLTHNZFNkLQusuaIvlG/NUtPSAxm8VeY2LSC+atq7YYGYwqVddLi1zkc1Y\n0DCF72JYna8C9S+P0T/4x9K8kCsZQb/ig8UE/xLoVWZC3JHfR2Y9dHM5/55j\n+1CN\r\n=IlD7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAbFUrDKALv9HVxchJJzDKp9NdBDct9ej9z6ND5LSLqGAiEAiMQFatS3MQsmQwMuK5sZmQIhfirdnTSZ8/YrmN1I1eE="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.19.0-alpha.21_1576572165432_0.14615166833458626"},"_hasShrinkwrap":false},"0.19.0-alpha.22":{"name":"@react-ssr/static","version":"0.19.0-alpha.22","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.7.5","@babel/plugin-proposal-class-properties":"^7.7.4","@babel/plugin-proposal-object-rest-spread":"^7.7.4","@babel/plugin-syntax-dynamic-import":"^7.7.4","@babel/plugin-transform-runtime":"^7.7.6","@babel/preset-env":"^7.7.6","@babel/preset-react":"^7.7.4","@babel/preset-typescript":"^7.7.4","@babel/register":"^7.7.4","@babel/runtime":"^7.7.6","@babel/runtime-corejs3":"^7.7.6","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.3.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.0.4","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.8.0","node-sass":"^4.13.0","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.0","slash":"^3.0.0","terser-webpack-plugin":"^2.3.0","unionfs":"^4.2.0","urlsafe-base64":"^1.0.0","webpack":"^4.41.3","webpack-dev-server":"^3.9.0","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-node-resolve":"^6.0.0","@types/cheerio":"^0.22.15","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.0.1","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.8.0","@types/node":"^12.12.18","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.16","@types/react-dom":"^16.9.4","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.0","@types/webpack-dev-server":"^3.9.0","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.12.0","react-dom":"^16.12.0","rimraf":"^3.0.0","rollup":"^1.27.13","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-terser":"^5.1.3","typescript":"^3.7.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"71199b034fb2626627d51d552f77a395ca57b5f7","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n- [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.19.0-alpha.22","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-5ulySEAKMLZ63J6Ycual29d1E7Kp8aDJMNrFH55H1GYxXl7krinaA0L4SpjqtqCedNSkUDp3FmtPncC4DtW8RQ==","shasum":"6b7a09c3878f0bd81b4f6695c56b6939919a82dc","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.19.0-alpha.22.tgz","fileCount":43,"unpackedSize":328260,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+JYXCRA9TVsSAnZWagAAkNIQAJEdwhrg0uvmvMLqtmSI\nnoqF5d6LGwUf3ZwgIKRmJwvmss9m7L1lt/4SqDA4CaPe01d4bQPUMZDEhMFy\nmdskQf8CTZsJeNFPWBqWeOPR/G6KUYzfnZudWs2ROAJi8dofA569a53Clhqg\nWDxdKmco0FD2sIZN/VPYq/iJMm4SzxY5aqInJlp0utuWNdAuPBl2PlMDpW9V\nlOS8Vr14zl13m/g88edaX3nDNjJ4Lh60/JcckqC6OkiZUkWYowtJD5Uznafm\nCt+qBO/tP4EUlKz+X6d4SBnYvOLthIFravUAnahFsceENX+b8k7nkesOyl9Q\nLT5V2XnnN1GUCA4mI239Wrmb5jAOhZB64WyRBf3femMipiy7wLmTDIfEIwI+\neLsO0csdqd4ybS9byJJNUni7HIw3d8xwxpe54qqKto2J4iSU1W/VPQRQpOa9\n7ae653lw/o1i6p2twEp11hC71sppLgxqwjR5H3YvQ1afW5rkUzxjwDtbekN/\nfFlz/aQaZm/9GqUGgul1ZfD5WS77CUZlAgQFoWfHOfwVH+9Hf9Q9TVqi6jfX\n5+OyvKR4olMO27hsNVjvLGygAPl6MrJDGilBch32M2G3wo5GFStLhmdTQZ1u\nRawVZ+a+dShrkVbMCCjfrr+u6nQxcqlkDl6u9Z0gbA05zsGDBEDbzkX4Qysu\n+tJF\r\n=jq27\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDRn5ha64ak72aZeVDwgOtM7EZhI8Efh6Z8evzEs+yx4AIhAJTxaC+wNQ5F1TBFbV95l96kQmKeNZTXbnXFRva3S/Dh"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.19.0-alpha.22_1576572438801_0.5896752449276454"},"_hasShrinkwrap":false},"0.19.0-alpha.23":{"name":"@react-ssr/static","version":"0.19.0-alpha.23","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.7.5","@babel/plugin-proposal-class-properties":"^7.7.4","@babel/plugin-proposal-object-rest-spread":"^7.7.4","@babel/plugin-syntax-dynamic-import":"^7.7.4","@babel/plugin-transform-runtime":"^7.7.6","@babel/preset-env":"^7.7.6","@babel/preset-react":"^7.7.4","@babel/preset-typescript":"^7.7.4","@babel/register":"^7.7.4","@babel/runtime":"^7.7.6","@babel/runtime-corejs3":"^7.7.6","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.3.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.0.4","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.8.0","node-sass":"^4.13.0","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.0","slash":"^3.0.0","terser-webpack-plugin":"^2.3.0","unionfs":"^4.2.0","urlsafe-base64":"^1.0.0","webpack":"^4.41.3","webpack-dev-server":"^3.9.0","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-node-resolve":"^6.0.0","@types/cheerio":"^0.22.15","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.0.1","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.8.0","@types/node":"^12.12.18","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.16","@types/react-dom":"^16.9.4","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.0","@types/webpack-dev-server":"^3.9.0","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.12.0","react-dom":"^16.12.0","rimraf":"^3.0.0","rollup":"^1.27.13","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-terser":"^5.1.3","typescript":"^3.7.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"92e2e99efa0f08d807abb66e15f91422a6ff7d15","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n- [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.19.0-alpha.23","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-jiE0tOol/3NrqiAeAZUcnQDaAxf6JZDJUMjvl1sqmlXKRyDTjFtaM32A1dyrKWPrGgCeiRXO7mH0hni7VcG/5g==","shasum":"5f3de5d13044cf92925a1ba42995f49a4a69773d","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.19.0-alpha.23.tgz","fileCount":43,"unpackedSize":329095,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+KPVCRA9TVsSAnZWagAAqNEQAJNWIuE6Qfop65t64h/F\nexYL+1ceClO++tMBE0qSp8UgPy3GxO80OGdrBi6JcMtL+pXCsgV6Blkw2I6d\nXZQFgDw4EIhXcS96IwNNlwSFh9sUHZNeB5Fuj9myiZu0smbLW6HGTgfy+A09\n/oid0ey0b24+zlGevTS0D354tVENIDcOdUtE2eTEqS72yP9iPtAqoO4Tg7Gq\n4LOA2sPK0NiB9qgymI6elEsGU/GT5DIEYdlGgpNSwitjKvuOghL65VaeTs5H\nLzs6k/De55Rb+Fe70vqnc/6fqBgfdWCzjDsATaN8ZAKss9Gwxc1aHnDsdHvd\nO3P3hl4FPuFwegu2pAVD7Y0inN9iv9BoA0U0m3gM6pZJWSOGy6V9HBwuABIO\nwJ1lh9Krt2Y6vh1PehwCkjuchdc7jvk7Fq+lZQX+9Yd5u0s7DGSM75MFpKJB\nfNi4GF5MX5EG/ILJHxZjkK1EQDfJlRj3cX2GD1R1UXsUh891iAoh4yhb0dZf\nC3Jy9HN/GWhJt8hvOA09xCbQv1WCiktkaSbmKy7NycIKqA02V66CljGGpJY5\ncR01F+wB89VTYjDcekYfK4gBnbFcT/Dw/QM7kHUur+9qQITbiC+nuvv0optf\nJ7VHuOhvVSskGu5tUtirBpF2qzLDuL22p4G3eNJ5ery2cd4IbPoeg3rr1dGP\nFp4V\r\n=JLf2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEMui8EOpJmRALxOHNQAG0cmbvYrevlb/QVeFGyT21LCAiBycPGJDxtZdMvCZ+a5c78fx4IYTycc9WMwIT64EFjOlQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.19.0-alpha.23_1576575957056_0.7657807233261957"},"_hasShrinkwrap":false},"0.19.0-alpha.25":{"name":"@react-ssr/static","version":"0.19.0-alpha.25","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.7.5","@babel/plugin-proposal-class-properties":"^7.7.4","@babel/plugin-proposal-object-rest-spread":"^7.7.4","@babel/plugin-syntax-dynamic-import":"^7.7.4","@babel/plugin-transform-runtime":"^7.7.6","@babel/preset-env":"^7.7.6","@babel/preset-react":"^7.7.4","@babel/preset-typescript":"^7.7.4","@babel/register":"^7.7.4","@babel/runtime":"^7.7.6","@babel/runtime-corejs3":"^7.7.6","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.3.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.0.4","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.8.0","node-sass":"^4.13.0","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.0","slash":"^3.0.0","terser-webpack-plugin":"^2.3.0","unionfs":"^4.2.0","urlsafe-base64":"^1.0.0","webpack":"^4.41.3","webpack-dev-server":"^3.9.0","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-node-resolve":"^6.0.0","@types/cheerio":"^0.22.15","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.0.1","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.8.0","@types/node":"^12.12.18","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.16","@types/react-dom":"^16.9.4","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.0","@types/webpack-dev-server":"^3.9.0","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.12.0","react-dom":"^16.12.0","rimraf":"^3.0.0","rollup":"^1.27.13","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-terser":"^5.1.3","typescript":"^3.7.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"23d260c7ac8dec6e7acf6070fc4aafdd79c931f4","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n- [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.19.0-alpha.25","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-94O05hnnjugKsUsywNcprgSAWotT2sLn1F4mzrdW7oQDgo9opBKVv55tbxPIZANX9g7XiEpCEheAZKmOAWwuug==","shasum":"90df022a16ded76a72c3a10cba6f583640625012","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.19.0-alpha.25.tgz","fileCount":43,"unpackedSize":329462,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+KgCCRA9TVsSAnZWagAA+AMP/1fJe6uk4gTpJAwTUolB\neJ8HvpFJqIV09xK7Ka1jyPoD94c3tLqGMQ5wHD+Vfn2+I9G/wj/7xxV8PRtb\n3lSb8Berj/LNp4cKoc8xOwhMv+GUPPc5HHnC2dV8qTQxYe/uiauh7epH7cWU\nfXknfiuwKdjqELpU23nZAQZWBjNK4rdGEj5//t2SbM1OA3CoLJkgKLqIw9Jk\nhc3xYHc9vCKvk6q3oVOr1kxIfDvrw/OYe9sYmO0HOOufu9yUahKrbVz1tUuc\n28C86UnSJtA0FaacQ5E3zxXvTKtvqpvgOCndIsDXed4GBDibDHw+lfq/DbkF\n8SxEG/dYsm5WEzftuFuKc5XevsbAIm1LYIDfXr+5uImXl/wbkkwYd2qTNC0K\nLWTW8EANQiOjZuHpsBtntpHdTpwi4VpYvvZDgIGR/jZZ4IYSRS/VrUZv7kvN\nOGjA6ZNGsxCDMzDKUERBx2BbZgZ2c1CuI3wO0luyhOVOsOCrfoSsZDkloGRd\nfKtnKxafLaceNV2kHdS8gi5gbamVojjgYR9eHhZDXjA6MqCWDGeTk5tl3VUq\npJiNhku1ktHN7C7cN6RMTKBDowLHWn9kOlq20XFWsu221FFv21g7vSBuN18q\nUl4b6hN3mjfUOq4D92Nuz41u4DL/tTggbTGLsstNMUj4ESOwnYkfeaN2jkV6\nMUFO\r\n=036e\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCraQV9es20tpAa6CVoTIIorhD/aic+8B4kyK4A20FH2wIhALqZfvrJ/4dpeEt2FWOzHD3NdNX4gvd8uq5DknAaIP4p"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.19.0-alpha.25_1576577025938_0.5321729073661059"},"_hasShrinkwrap":false},"0.19.0-alpha.26":{"name":"@react-ssr/static","version":"0.19.0-alpha.26","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.7.5","@babel/plugin-proposal-class-properties":"^7.7.4","@babel/plugin-proposal-object-rest-spread":"^7.7.4","@babel/plugin-syntax-dynamic-import":"^7.7.4","@babel/plugin-transform-runtime":"^7.7.6","@babel/preset-env":"^7.7.6","@babel/preset-react":"^7.7.4","@babel/preset-typescript":"^7.7.4","@babel/register":"^7.7.4","@babel/runtime":"^7.7.6","@babel/runtime-corejs3":"^7.7.6","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.3.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.0.4","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.8.0","node-sass":"^4.13.0","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.0","slash":"^3.0.0","terser-webpack-plugin":"^2.3.0","unionfs":"^4.2.0","urlsafe-base64":"^1.0.0","webpack":"^4.41.3","webpack-dev-server":"^3.9.0","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-node-resolve":"^6.0.0","@types/cheerio":"^0.22.15","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.0.1","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.8.0","@types/node":"^12.12.18","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.16","@types/react-dom":"^16.9.4","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.0","@types/webpack-dev-server":"^3.9.0","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.12.0","react-dom":"^16.12.0","rimraf":"^3.0.0","rollup":"^1.27.13","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-terser":"^5.1.3","typescript":"^3.7.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"7a8775cc9eb445d842d699dd413c2d83079a9899","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n- [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.19.0-alpha.26","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-kFUS0Y04WMgzoCrbLqHr5onu7pwAPYdPp/azZcpnlZRVDLCE0sY7kNoYfmLJdXracVMVI4sXljNRpOzv6EvrGw==","shasum":"aca16615630199cc464ca96ef792ee2cd1edb0bc","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.19.0-alpha.26.tgz","fileCount":43,"unpackedSize":329433,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+Kh8CRA9TVsSAnZWagAAbDcQAJzaEsPH0rr65QK+K2rr\nwZlo6O4OKgAmvL5EWwX6u/9OWSFt74jy8z6fTYbuAKDUmezBZi0OGJtxshi6\nC6ej30Vyq0fZLHkSCmVq2YUHPuvfoT5yKJWfNwuC9xmxCJTWfO13z7GkcyeI\nvVfVv8o8+cJBXDzpBpLQkpYAVPd5/2L1tG/c9+H0EzVtWJTNfn0VA7EhEqq4\niYUmkSc9SpPTszTlN+0ibOVgRFfsMPiBeps59zC5Sz6JvCd7PHrk1CQCN2/U\noSQbmEhqOEMQneZWsxt3DREsCXLq4r2bHk0+KwsX9avYbzRYL8hlz3HPLNWz\ndiuCuI2NP+TiKfPPAgTBIuJYEZqHrOQHUXamjNqyF9UQCBeCAtvuAJXcikYm\nAkGD/hrLD03wY6NGN9phQC20KHS4Emrmqxluh3pvGXNcaBvaqRUudJAKOiZP\nh+O4jGuxT4vr+MPRuBRo1mp9CUL8bSc3RlycF0HYrgSajr2xvuNkqaK1vnKI\nk/UHUbpbMmL1SNIOvHYfRsFW/WJr9GKX7oZPggkc6BZzdfJ0PVhnhsbfTUP5\n5W5HpzU+ZT6dYmKZEMxFRlAYSx3JqNUTty0kjn4OzhjwNmOkOiRBUK6nuj4f\nVY2jwoNxesDoFPhaadj46I/Irpa8MOxHrk3ZmlbMgnPW7R7CrJAF+we8qhTs\nzvTk\r\n=ogBZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAFJ3rRZAtmo6jOWG840quAWjYjrNOFIeL29jBSbh4TTAiEAvHfdtiP1cprXYXYM4+SFa6GRIXHgRZnydNFQsWpNxNw="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.19.0-alpha.26_1576577147854_0.3219651366386318"},"_hasShrinkwrap":false},"0.19.0-alpha.27":{"name":"@react-ssr/static","version":"0.19.0-alpha.27","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.7.5","@babel/plugin-proposal-class-properties":"^7.7.4","@babel/plugin-proposal-object-rest-spread":"^7.7.4","@babel/plugin-syntax-dynamic-import":"^7.7.4","@babel/plugin-transform-runtime":"^7.7.6","@babel/preset-env":"^7.7.6","@babel/preset-react":"^7.7.4","@babel/preset-typescript":"^7.7.4","@babel/register":"^7.7.4","@babel/runtime":"^7.7.6","@babel/runtime-corejs3":"^7.7.6","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.3.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.0.4","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.8.0","node-sass":"^4.13.0","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.0","slash":"^3.0.0","terser-webpack-plugin":"^2.3.0","unionfs":"^4.2.0","urlsafe-base64":"^1.0.0","webpack":"^4.41.3","webpack-dev-server":"^3.9.0","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-node-resolve":"^6.0.0","@types/cheerio":"^0.22.15","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.0.1","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.8.0","@types/node":"^12.12.18","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.16","@types/react-dom":"^16.9.4","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.0","@types/webpack-dev-server":"^3.9.0","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.12.0","react-dom":"^16.12.0","rimraf":"^3.0.0","rollup":"^1.27.13","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-terser":"^5.1.3","typescript":"^3.7.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"99dfb12f5c8262141533a086c17e94fd00d7938f","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n- [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.19.0-alpha.27","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-Y+VQDnAUUFVoGg+0J9C98gs9sHZGTDiIq7bFzASk0o6M3hFgaCVW4p1oWUxlZaKU/fDHMBexWKfKlXxLDztDfw==","shasum":"600929e85213f62c2e40cada105384389437666d","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.19.0-alpha.27.tgz","fileCount":43,"unpackedSize":329346,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+KiiCRA9TVsSAnZWagAAxrsP/1uRSfnu0HMP2f46g0Ix\njvbchaOD1Iu4NnNxPGId1cU6iIH658FqjKrEHL2+2HDMYOXtt6aMkWJCJQbl\nL+ey3DBaGKGqEwjcxSH5Fh6s4JoezjyxWZL0yMIpqWb+3+14W5aIi1m2AyFM\nbOTbPA8t39IdU4OYTtdQX1abDMdaPzQ33Wf+n7XEJvWITJBsveiuw/lWr0sn\nEl9R4pRB14I9ydSmkb4VoVw+v9bMkW3W3oWr5fHl7fyEERKG1lMyR2pBdohY\nTRN/qRTlUy/ug8v30utM8HGklY84epK/W8RXzC4WycECi/oW6ssq81LSvtUO\nsqLd5QUtlqGAHChh/zGV4EBMUvSFReNacGI0/qmAyU3m3sPCxRcPY2g17Of3\no2P+9OwRUyiLFuG57+tWh7co4bAPFzv0Zsa94H5T6/5SBwQ9B3sx8LLBeJX8\nQJtkZbxdTdkHrBIdZr5/FYQELaKoqAJ8TmWn6qPJCdjrFv4GMWJOjnQ04IK+\nRn+Av457x0PGijA/jbmbEaRgqrGAnSxyI3oEBB5062OwnXKABa1eHdrFJfWP\neR/Ggg0r+DUpwG6oZK/aabGrlgzdxoTqIX+5nlThrXZM/s4z1m0JKiz/jlES\n5mq9dvapWOcaHC2bEpVKMJCu63JG95gSygqoTJ/WzMAyiTqZ7HXGy5MFCdKo\nroRv\r\n=IS3Y\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDTbLXC/Io2pAEFT7zwzuC55Qoy88BIMejGoAwxUZmDqAIhAMavl+K+7TpkSbK+rMsWcQWNajIIsZ4Q0n4k7QBP3e7L"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.19.0-alpha.27_1576577185894_0.9159462891213317"},"_hasShrinkwrap":false},"0.19.0-alpha.28":{"name":"@react-ssr/static","version":"0.19.0-alpha.28","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.7.5","@babel/plugin-proposal-class-properties":"^7.7.4","@babel/plugin-proposal-object-rest-spread":"^7.7.4","@babel/plugin-syntax-dynamic-import":"^7.7.4","@babel/plugin-transform-runtime":"^7.7.6","@babel/preset-env":"^7.7.6","@babel/preset-react":"^7.7.4","@babel/preset-typescript":"^7.7.4","@babel/register":"^7.7.4","@babel/runtime":"^7.7.6","@babel/runtime-corejs3":"^7.7.6","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.3.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.0.4","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.8.0","node-sass":"^4.13.0","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.0","slash":"^3.0.0","terser-webpack-plugin":"^2.3.0","unionfs":"^4.2.0","urlsafe-base64":"^1.0.0","webpack":"^4.41.3","webpack-dev-server":"^3.9.0","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-node-resolve":"^6.0.0","@types/cheerio":"^0.22.15","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.0.1","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.8.0","@types/node":"^12.12.18","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.16","@types/react-dom":"^16.9.4","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.0","@types/webpack-dev-server":"^3.9.0","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.12.0","react-dom":"^16.12.0","rimraf":"^3.0.0","rollup":"^1.27.13","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-terser":"^5.1.3","typescript":"^3.7.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"be1f3d45b58fc5cc44a8c7bdad67d15043578f81","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n- [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.19.0-alpha.28","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-2hTXDz8BZpZ3FeiK4AZyF2wrZX2aeP8pXdf7aK4CR3D1FPYBRzjDzvqTbU8uSvYid/tjAvq2EeLihsAc4IKSmA==","shasum":"2eebb8e178315080cc40a9c136eaa8a9a6f17c9b","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.19.0-alpha.28.tgz","fileCount":43,"unpackedSize":329365,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+KmuCRA9TVsSAnZWagAAFRgP/2kSHBTUr0yhfojJnJf2\nwHdRdOnt0GGdg6nYqOFUVvXtJKcFtGLXyMARIu6yJHIhuIAeIcrfEHF8ygiJ\n+jvDiVC068PgwFd21lbHyMmSE0ltKrT+y7HnxzptULXehheDs8oVcWqE/3pL\nNyz2923VcS24DuIK68DLOvHENLh8Hqe2F2K9+wyUX0r2wKEI1OEVb8GPMcti\nwl2GYaE9SB7ZV/eSrlf7pNYIlBWAGfb5iOkVsD8qdRDSxalA4+mirq3I3WEN\npLi+/kvebMdB10NtzRFA+HiclB3EWQY9+4pdye12V3EQeE+2xr7flCgk30EW\nx/JMXcf+OcgH0MciEQ7l6DU5O0BO7+IgCo1acnG5ujDvYevtQFan+heA++i5\nDplJS2W+oba1qvpoO5kWGG7pwcmKQp2YRzBFlhH6Ll9nozVOB68ec7uH8ID3\nORuZy2wvgx1DmbdzLEnySYQyR1dyeEhxgvuI2PtHYG1j4Ns56RmJn0BFTQbB\nMv9oMh/M5YzxXn+QBkZJdUKYVh5lMomw17crTPGMk1aDkyqRtgDwhmKIKzkN\n4vzz9ADer00jXHO+kTphn9VubNX9uhRyZcN4rzrBmncg9cvQGLGQhDlswU8Z\nBQ5HIJ6Ei8hmgTrdTh70EvP2WiMfFAuhScxBjNTD782CPoUAatrLKQ4NKpyG\nu2QX\r\n=TySS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCaTNl/osSTxN/G39H/hwyrSnSzkMHY6c64tok9MBLWPAIgYhx08S81/VF4l4IdnmCtsNdOGbqK0zXl0yUNX6FY3sU="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.19.0-alpha.28_1576577453745_0.10744345270640876"},"_hasShrinkwrap":false},"0.19.0-alpha.29":{"name":"@react-ssr/static","version":"0.19.0-alpha.29","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.7.5","@babel/plugin-proposal-class-properties":"^7.7.4","@babel/plugin-proposal-object-rest-spread":"^7.7.4","@babel/plugin-syntax-dynamic-import":"^7.7.4","@babel/plugin-transform-runtime":"^7.7.6","@babel/preset-env":"^7.7.6","@babel/preset-react":"^7.7.4","@babel/preset-typescript":"^7.7.4","@babel/register":"^7.7.4","@babel/runtime":"^7.7.6","@babel/runtime-corejs3":"^7.7.6","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.3.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.0.4","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.8.0","node-sass":"^4.13.0","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.0","slash":"^3.0.0","terser-webpack-plugin":"^2.3.0","unionfs":"^4.2.0","urlsafe-base64":"^1.0.0","webpack":"^4.41.3","webpack-dev-server":"^3.9.0","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-node-resolve":"^6.0.0","@types/cheerio":"^0.22.15","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.0.1","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.8.0","@types/node":"^12.12.18","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.16","@types/react-dom":"^16.9.4","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.0","@types/webpack-dev-server":"^3.9.0","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.12.0","react-dom":"^16.12.0","rimraf":"^3.0.0","rollup":"^1.27.13","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-terser":"^5.1.3","typescript":"^3.7.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"828b3a01a9f8bf1152ddda1d05e5a126f4035bfd","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n- [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.19.0-alpha.29","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-pa0MDdZOGYUVS9IhfgiRpjANriVgeO2taQGxD1xevMpKGmTVImPq4luSRphqRDfJnH96055vFRTK4GmEmhcVTw==","shasum":"bbfab7091ac2ecf465ba1e7d644a8facef8d6f66","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.19.0-alpha.29.tgz","fileCount":43,"unpackedSize":329348,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+KpgCRA9TVsSAnZWagAAkVsP/0tguA3Up/8n+ZVggscG\nurbDBwVeb5OFMwy4CB7gSTZsRLcKJmslDxACcok1mWzbG74A2Bxwow8Mg6z0\ngP6UJRknU3PPWqBWFKYATppwY3e/aHPxcPlzD1pUSV9A/KWKZHAaU8duVDY8\nCiw0FenJK4stZet495+sr7r4Ync0kYzKabrJIQ582XIqwVKPCJNqiGw3jCOM\nIUep2eOP2WL+EbEDmxg8qoLQvE4CY8QvA5DC71sPEU5NZcbnhP0NknmKyBcK\nDyZvX6w+BNZsQfNRTWpiHdgodXam/7U7B0DzO2JjOepr1r213g9+YinGSfQE\nJNVsy2Yp1WxSu4uwzMjs0co1v32ouKAeDiOdW6mX2WSY6lOkmL/vPLZvlqFO\nrRc7h6zK/ekcEmqcikyjz5bSqWYM8CTtaMshA+bC7dPKidsHCLdC8Etwwxll\nUW+ThHWHiYheNuLLBR5izpWUTy534EHumtiHZZ1ZKEa/0jvO3BARKrw/Uc4q\nm3aqgCDrDw692Rcts96ZS0eTFDJwitz7/BR6AB0X5NKCwIqRoPaZHE98xJbv\nTHMw1cJI4bvmmSUlH/ooO/9kVUI7CRpRCNfYDCoTIrJxk8nX0ZTXtXAYu799\nKsPp08+nd77LgdufhArqyNPZ8ktvp5QbdJ+Ia/QqYPv1IbVvTjdTzX5Odm2T\nO9nY\r\n=NKEY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDIhs1xWqmXH2rgbbF03eIZcRmUVVu92yRMHLs+uMPWNQIgafSXeQExH5dJ7xhO0iohHRBYEt06IBLb74VIw6JAZ9A="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.19.0-alpha.29_1576577632390_0.1741784914993627"},"_hasShrinkwrap":false},"0.19.0-alpha.30":{"name":"@react-ssr/static","version":"0.19.0-alpha.30","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.7.5","@babel/plugin-proposal-class-properties":"^7.7.4","@babel/plugin-proposal-object-rest-spread":"^7.7.4","@babel/plugin-syntax-dynamic-import":"^7.7.4","@babel/plugin-transform-runtime":"^7.7.6","@babel/preset-env":"^7.7.6","@babel/preset-react":"^7.7.4","@babel/preset-typescript":"^7.7.4","@babel/register":"^7.7.4","@babel/runtime":"^7.7.6","@babel/runtime-corejs3":"^7.7.6","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.3.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.0.4","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.8.0","node-sass":"^4.13.0","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.0","slash":"^3.0.0","terser-webpack-plugin":"^2.3.0","unionfs":"^4.2.0","urlsafe-base64":"^1.0.0","webpack":"^4.41.3","webpack-dev-server":"^3.9.0","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-node-resolve":"^6.0.0","@types/cheerio":"^0.22.15","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.0.1","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.8.0","@types/node":"^12.12.18","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.16","@types/react-dom":"^16.9.4","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.0","@types/webpack-dev-server":"^3.9.0","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.12.0","react-dom":"^16.12.0","rimraf":"^3.0.0","rollup":"^1.27.13","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-terser":"^5.1.3","typescript":"^3.7.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"259fb20c8e11252c2c38b298df8572b25ac8b20d","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n- [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.19.0-alpha.30","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-00sBjPVOWGzxbb+RoAWK6Ze21LEryYpX6eqV4OMR52/xzSxxX5BqzY3iRXbo8NlQ6FEKiN3/IE3g+xjcdLwJSQ==","shasum":"56bdd537fa347bff8ce8ee33a0c3338ac5ae56b0","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.19.0-alpha.30.tgz","fileCount":43,"unpackedSize":329410,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+KsgCRA9TVsSAnZWagAAXN4QAIVa8s2rE84Zfl6W8bPV\njB1UGAG8XPj2W1ME5g1PsONYRvLiSlwsHSoqeLUL5eD8sCmsAHbOeG0N8EVc\nSaz2aiSt46MnZcqKFkhXGpGgkYcmpR+hNmqvYesmJxljxHuSXK/+oqIFlKpe\n7NlgY+85dH9r4lZ7PGY7iveYHIpftUqoGCcNpzkpZVB6iQ4/Im9ZK0ksfGZv\nJFZ/6UEwkYYMS+17jvc/bMMGkFMjukrOr97cotC9Ujn2VZw8mjNXCDrOLkNn\nyTheuSsNvA2rMiH/cXzmlMHjudYhttzIWKPhfhqKBUHN1l8rVUGl8KTgdC14\nQjqSAyMQWBz2huK85cAE9X9SvjXqcb3QwN8emHjWl+Ih6O21xhgx5c0TL3Nk\nQE09H7q/uvQLptZiqr/LCccslG4c11eTY0yplI8YDyMPqqLFtjXfItxTL3pJ\ne4qrSDDjOpsQBy1QXvFIAFGF0pWsm4+1Q4C6hikkZZErimC8bYKMaOByBmvc\nzs7d7RZjXPY/0NgVopxAhoK6bWCzjvxYZzxq/ad8as4/EpeiBG5XEe2KCr9o\nRvutpGURJ3i6wq0OOEeOtYWUZoD8WXJFhMyLHseWc3f4zRbZ6WuadGHyKQRE\nAqsUyI2KbvyDxDXIFS6BjxYbRmESsz03bbfw4n7v3pPyy4ga4KHY2rDOIaJ2\n1YXv\r\n=mzGO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICUgLFi3L20Gg3+wMttCOVMhml7MNvoCOX3ikuFByXIzAiBEbpCtAhkc5ASCyQDCeifnpw06sJEhhpGbdghl3GZ46A=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.19.0-alpha.30_1576577824406_0.3301337092677814"},"_hasShrinkwrap":false},"0.19.0-alpha.31":{"name":"@react-ssr/static","version":"0.19.0-alpha.31","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.7.5","@babel/plugin-proposal-class-properties":"^7.7.4","@babel/plugin-proposal-object-rest-spread":"^7.7.4","@babel/plugin-syntax-dynamic-import":"^7.7.4","@babel/plugin-transform-runtime":"^7.7.6","@babel/preset-env":"^7.7.6","@babel/preset-react":"^7.7.4","@babel/preset-typescript":"^7.7.4","@babel/register":"^7.7.4","@babel/runtime":"^7.7.6","@babel/runtime-corejs3":"^7.7.6","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.3.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.0.4","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.8.0","node-sass":"^4.13.0","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.0","slash":"^3.0.0","terser-webpack-plugin":"^2.3.0","unionfs":"^4.2.0","urlsafe-base64":"^1.0.0","webpack":"^4.41.3","webpack-dev-server":"^3.9.0","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-node-resolve":"^6.0.0","@types/cheerio":"^0.22.15","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.0.1","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.8.0","@types/node":"^12.12.18","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.16","@types/react-dom":"^16.9.4","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.0","@types/webpack-dev-server":"^3.9.0","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.12.0","react-dom":"^16.12.0","rimraf":"^3.0.0","rollup":"^1.27.13","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-terser":"^5.1.3","typescript":"^3.7.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"c3eb83a41b958f51928e1b0173cc5a177e32d814","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n- [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.19.0-alpha.31","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-su5q7bjCqZchYGa1aXnJqrDPLhzF1tmtKO0eyU6R2/MLP2MFAIL+hG4f6+LmsZfF6/XN+thmxkHGhk9XOUTwkw==","shasum":"0cbcb32745a74cea94f2939c7fbaa909c13cb5d9","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.19.0-alpha.31.tgz","fileCount":43,"unpackedSize":329455,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+KwWCRA9TVsSAnZWagAAnWcP/R6Mmw3SfTpM36wQ+QJU\na5QagekkPFPfccRFPiLAitTOFt/3llp3FsRU+JzVM7gBRkNSSfmOa/zRUicf\na9jAHHUSnXiD2bxfL1IM+brIoaznKwqnvn4y+9x0JiTMUP9/WJCc3TnSSe1E\n0AIHqDYa32kRIHTgnhX/zgI/bAQPPsThV+sS6bVKfD+0zCW6bXKiU730fjA+\nkp6pqUHXcb0DhWhpMjUosgGEKj+w3jtT4W/cqosj3+Q9zyQoQiCZs85ZtoR0\nYatcBUEfIz8RMpyofdYyGgcS7C2d7RLMSgzTZh8kc3iLctorGduFsM+JRH2u\nP/j9oTkEmASm+BfbaNySdAwmPcv8Lt80ecJ/Io/1Yx4h58/pCL31CloO54tP\nkuLthfzMPrqIg4ID64yBtjorCiMPYTqk+YlK6HpPKzz3QdNfrtz4DdQhzTNF\nTCLLDU83zTZTybYeZAsHrZtMfc8KZlruQpRO0JDVg77ffyFsflVzWjejZsyA\nerM2K4MJenQ3t95u6+kIidKLkwfY32jiN4pIRUloExWIJ/QSDnEW246XmloK\nri4CH1JW0Ro1a/FMUw4Jnc5Uph1bWG1OA3zWLuFKzC0QCNBD93Rf63LGwmqB\nV1+hXr/Xz79MEV+b5jXxwoWmMjxJfvfX6Z++ANuSW4XkQjF42mOs885U3RsK\nxYXz\r\n=fQqn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIADl3J1eMM67lh1ZYajKW4uPR1OGWPbwlehpcBeg78/kAiAWzLg3tAgvTKryilK3Ex1SUuXF7+msAkhQsc51tqi6cw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.19.0-alpha.31_1576578069700_0.742758534045254"},"_hasShrinkwrap":false},"0.19.0-alpha.32":{"name":"@react-ssr/static","version":"0.19.0-alpha.32","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.7.5","@babel/plugin-proposal-class-properties":"^7.7.4","@babel/plugin-proposal-object-rest-spread":"^7.7.4","@babel/plugin-syntax-dynamic-import":"^7.7.4","@babel/plugin-transform-runtime":"^7.7.6","@babel/preset-env":"^7.7.6","@babel/preset-react":"^7.7.4","@babel/preset-typescript":"^7.7.4","@babel/register":"^7.7.4","@babel/runtime":"^7.7.6","@babel/runtime-corejs3":"^7.7.6","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.3.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.0.4","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.8.0","node-sass":"^4.13.0","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.0","slash":"^3.0.0","terser-webpack-plugin":"^2.3.0","unionfs":"^4.2.0","urlsafe-base64":"^1.0.0","webpack":"^4.41.3","webpack-dev-server":"^3.9.0","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-node-resolve":"^6.0.0","@types/cheerio":"^0.22.15","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.0.1","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.8.0","@types/node":"^12.12.18","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.16","@types/react-dom":"^16.9.4","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.0","@types/webpack-dev-server":"^3.9.0","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.12.0","react-dom":"^16.12.0","rimraf":"^3.0.0","rollup":"^1.27.13","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-terser":"^5.1.3","typescript":"^3.7.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"0393fa612ccb090ea2f997abb8f0bf4b2e600943","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n- [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.19.0-alpha.32","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-/0FXWaRItuAGHS7VZkON7FdWYVBlp6QfJnts9F/zGqKmim2Hq3NjCvlkb363dfVZS13033EDJZ0+ByE3oCJvQg==","shasum":"534dae88f57af1842c617d4784204bee789a2cc8","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.19.0-alpha.32.tgz","fileCount":43,"unpackedSize":329473,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+Kz/CRA9TVsSAnZWagAAHEoQAJul5Sg3jb+Vp/MROmkO\n/r6XeFh5mMDG0BvLbA/HaBYOO1l7Qa2QbjIBrog3muRON6O+HIkIk9aN/c9r\nsP1f/KzBseDeHVfEcA7e2yehWqPQiRm8VBwoGk05aXP+Q+eIPkxUTyDFKY9U\nyNY4WsgS/hbWIGko68FlASi1iWMjzEDL0oU621dhxk+DTczRyRpQNOVPAkp+\nSbYzOvCDUzByCXTPKu64s6uI37aVrQB/5BbjomrbmEvgRw5NzKoauStcxWe7\ntBZdvdRVmF/J+DLxY6ZV4oySzq3JEKytOXtt13GP5YyNZrHlDterHzs/xth0\nNLBlMav0KmSHwXkhCkk3Q2bui7MXA14PtRJmHiQo0YyvbUOris0Wzxeo1vc2\njxGvNaJbY3HRMTT/IkjStFRdHaxWCzfCBCRIHFCG6MF47+GpBPfTKUo8KCFu\nj3Ui1ViumSgZH/gduNuDUyGV1AXakz/VQjcL0glhnunLtLjGHS1o9mBlnkCp\nAQqk6mMQJAqTOWAqp3gGASnh84gQMA1Y63pNJMEcr6eVK0HdcEn+kbyWCE3g\nMD26NGRisiwEteNMJ/uzXGqmay0/tHhn5dN7pWCTM2l6EBdtTH97Tpw4SO5z\nKqAanwvr5Al7AXW/cnIYsgXThlhYHTxHG4DHUQghpfuH4gajGH7A4ojPD/7l\no4+7\r\n=i9fT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICXBbL3lB4dG2zyxwfuijXqhmDqxR7yOloxVxX/pT3LBAiAJOw/NqSNYby6Gt51rXm2shfuSalZpLRiToh0jKWiCAw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.19.0-alpha.32_1576578302649_0.602488912246675"},"_hasShrinkwrap":false},"0.19.0-alpha.33":{"name":"@react-ssr/static","version":"0.19.0-alpha.33","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.7.5","@babel/plugin-proposal-class-properties":"^7.7.4","@babel/plugin-proposal-object-rest-spread":"^7.7.4","@babel/plugin-syntax-dynamic-import":"^7.7.4","@babel/plugin-transform-runtime":"^7.7.6","@babel/preset-env":"^7.7.6","@babel/preset-react":"^7.7.4","@babel/preset-typescript":"^7.7.4","@babel/register":"^7.7.4","@babel/runtime":"^7.7.6","@babel/runtime-corejs3":"^7.7.6","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.3.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.0.4","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.8.0","node-sass":"^4.13.0","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.0","slash":"^3.0.0","terser-webpack-plugin":"^2.3.0","unionfs":"^4.2.0","urlsafe-base64":"^1.0.0","webpack":"^4.41.3","webpack-dev-server":"^3.9.0","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-node-resolve":"^6.0.0","@types/cheerio":"^0.22.15","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.0.1","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.8.0","@types/node":"^12.12.18","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.16","@types/react-dom":"^16.9.4","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.0","@types/webpack-dev-server":"^3.9.0","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.12.0","react-dom":"^16.12.0","rimraf":"^3.0.0","rollup":"^1.27.13","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-terser":"^5.1.3","typescript":"^3.7.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"2f73a2ab58a6a7788904f1366670a39151d91a81","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n- [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.19.0-alpha.33","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-/6jEMP/qVdqazJ0z3cCUZ5bo8rLjLxAgKN81ywZitSa5w8lhZV8yL5y3O2q8oixvw/qtR7z/9lHK3NbQRHO9zA==","shasum":"d55691cddec66126bab7c66f448bc42cd459ce1d","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.19.0-alpha.33.tgz","fileCount":43,"unpackedSize":329477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+K5GCRA9TVsSAnZWagAA8/AP/jt91KcCCZ1hiIEk28gu\nL71Kfl+gVH9h8wtGqb+aCLVZodYV0PxIUaRon3g4neQcCw1+epb4YngL+2Bu\n9I2ktrxBtmnV/TO+jyCC+39kUNMJlkmb9ZrH962BhL91D3OJhwozD/Q7beDn\n3pYCKIuTvaTtSIL9y4dsDhs8NFxGcB4WxsjB716591OxV1iwNrBF8ip/nc9z\nUGiE30XO8cEzp0tjJGqxRcCLHaCwDK8EVLl3G4JqpA7VWtsA4OwAe8WEBLua\nMwko8mHuDJoHQgUflQCOUv5tFVKq7rXorl3Xn000qkNYWx/4J/BUxMw36zRG\nOXWBizlN64D5fjmhRUoT5gwG57KuVRPkzAoogVB90IMWQgBeGdjHTVT55Jrq\n+cmNpejtkrdYB6jz0pdIq+8oWNGfKmbGuJAtl9LDUkktd4I5Cef44JA4eAo8\nzZQq6chnM/GUi1YVlriint1gG/C4e8Om8O9g6S8PoLD15ubmKRgiBSPpXSJA\nNA0ToepF4ROS6Qbrv3ouzorlmB+ealJQyUt8WuCfqqoSLKArDxDcSEZ2KpZa\nIR96yQNy4Qo9VHy/442nmO1mM2KaFuQaZohmRlLMrORvhFFowurafmR79FmV\nOgPXaCIlJ+oWYvCOtEVGsIn49JJVOK9lc+TGjjExT5Rizt1wULP6xUgkYsVJ\nmgd4\r\n=OMR/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDvNAzma/TyWm9vPoPUzEKOxJIF5zXAZSTkX2uQkg8AUAiARrFh42qXfTqx4K7SrNQ1l8bDWKS8n2VXGHff7o1qfIw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.19.0-alpha.33_1576578629826_0.5002907841135422"},"_hasShrinkwrap":false},"0.19.0-alpha.34":{"name":"@react-ssr/static","version":"0.19.0-alpha.34","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.7.5","@babel/plugin-proposal-class-properties":"^7.7.4","@babel/plugin-proposal-object-rest-spread":"^7.7.4","@babel/plugin-syntax-dynamic-import":"^7.7.4","@babel/plugin-transform-runtime":"^7.7.6","@babel/preset-env":"^7.7.6","@babel/preset-react":"^7.7.4","@babel/preset-typescript":"^7.7.4","@babel/register":"^7.7.4","@babel/runtime":"^7.7.6","@babel/runtime-corejs3":"^7.7.6","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.3.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.0.4","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.8.0","node-sass":"^4.13.0","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.0","slash":"^3.0.0","terser-webpack-plugin":"^2.3.0","unionfs":"^4.2.0","urlsafe-base64":"^1.0.0","webpack":"^4.41.3","webpack-dev-server":"^3.9.0","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-node-resolve":"^6.0.0","@types/cheerio":"^0.22.15","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.0.1","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.8.0","@types/node":"^12.12.18","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.16","@types/react-dom":"^16.9.4","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.0","@types/webpack-dev-server":"^3.9.0","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.12.0","react-dom":"^16.12.0","rimraf":"^3.0.0","rollup":"^1.27.13","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-terser":"^5.1.3","typescript":"^3.7.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"dc96d45b15d9dd4cb6accf0a1abaaa551cf62742","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n- [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.19.0-alpha.34","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-3+9rFlLrhredJ/+4kT1s0S7+IsEIa6F9G5Eq25B/f2VV4Zly/UH4AfHrb050yiJh8Gco9DF09wqNDIS7IcYJuA==","shasum":"e898119cd69dd02a7baf5ef95d31e02c135ff95c","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.19.0-alpha.34.tgz","fileCount":43,"unpackedSize":329433,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+K7qCRA9TVsSAnZWagAAY84P/1vxChwArnOISPhwegiQ\nhXxU8diG+tJCKC8U8C2gw+GBcY9fr6kcM08D607yLZSsDaAWnCIKWgafizJu\n7MTAERhuiRz+G+Vg6x93vGpOtIiMnBAC5IDELmKN1pep02iN5Gnpj/VJMkrB\ngiUZZ91PKSPOiDj4Rvp7KSFX7/l2iNJXQGx/qzg7W2ddnfKUgRbS8DzAxwv0\n+PooUR8gThIJdcfLGs/CCirvPvdnStLqKL9C78j/3hUwHG5FRcKeAKXHqeKM\nTRvN+ZOYSQs1VH9vo50XoOYWqPUkSIC2q1VizDxyyPazZEsDNOkE5GW1Tuyq\nRrW18cQKHW1YUibPFktteNXjAvw3pD1xKEvHnOfV0qu7tJToM0BCb6Z2oOT0\nXcKBMjmYsv2mCsD6p+bemHX79BjmVSAm+RkKDe4hK5PmlETjWTmixFQRIfJM\njpRHADp0gWVdW3T6aic//s2dMCtrw/fMqTqfddaNC4ktWg6GjuF3mKRVDWzG\n+RYQbpZQdMmzyLWbMi0eZu9JETV4q73D7KRlV54Gs/aerb2nH53vcpEpo77T\n73peiNMX1LiYxzE7kGuo018BDtOQP2f52pO6/f/eFXpZljD2lUSO2KtjXNUD\n153RZONcwSoIOflAenc/nBgerUPYm9kfADia/6r0Ia5yHLX57Unbk/zQUuPL\nXNbv\r\n=9/3u\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD8yCmUPi9bsdGYMDrxMwmZb4rORS9xwDbD26aqRcCAkAIhAL4NBAFeAbjljcIO3aohEWdZc4FpHKdkpHQiNlDhzYV6"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.19.0-alpha.34_1576578793660_0.5287870593242263"},"_hasShrinkwrap":false},"0.19.0-alpha.35":{"name":"@react-ssr/static","version":"0.19.0-alpha.35","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.7.5","@babel/plugin-proposal-class-properties":"^7.7.4","@babel/plugin-proposal-object-rest-spread":"^7.7.4","@babel/plugin-syntax-dynamic-import":"^7.7.4","@babel/plugin-transform-runtime":"^7.7.6","@babel/preset-env":"^7.7.6","@babel/preset-react":"^7.7.4","@babel/preset-typescript":"^7.7.4","@babel/register":"^7.7.4","@babel/runtime":"^7.7.6","@babel/runtime-corejs3":"^7.7.6","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.3.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.0.4","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.8.0","node-sass":"^4.13.0","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.0","slash":"^3.0.0","terser-webpack-plugin":"^2.3.0","unionfs":"^4.2.0","urlsafe-base64":"^1.0.0","webpack":"^4.41.3","webpack-dev-server":"^3.9.0","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-node-resolve":"^6.0.0","@types/cheerio":"^0.22.15","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.0.1","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.8.0","@types/node":"^12.12.18","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.16","@types/react-dom":"^16.9.4","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.0","@types/webpack-dev-server":"^3.9.0","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.12.0","react-dom":"^16.12.0","rimraf":"^3.0.0","rollup":"^1.27.13","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-terser":"^5.1.3","typescript":"^3.7.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"f65903e4aae6c5bc0fa8f4ac48ee8566d0060edb","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n- [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.19.0-alpha.35","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-bqWtoxOlDLLktiCQ+STqL772oFxBBMJPwO6onkTfYCOfZj+Y/keXzXuTBKRBRBZ5mYpWrKN2r6Z7h+mRaiAl0w==","shasum":"e70b47da8afac3902019c7aeb1f2b3284b5d35fb","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.19.0-alpha.35.tgz","fileCount":43,"unpackedSize":329638,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+LoECRA9TVsSAnZWagAAzk4P/iCmMwpooKUX+kQJ35rH\n1nFXaI+hC6WTuSlxxzmHSEfClXlzGHcodLO+SjnDcUoJyjJddgrMFid4kY5x\nJevbhgoy5DO+5heRdsuL6XxOt3MOg1BdsN6fR1109F7mwyveqDxG6kfo8f0X\nLH7FxZcBNWGBr4910PVzkFy4wO48qGP3VHKddBfXaPh+6l450Yh6UfNVcYZ5\nTVG3OfjN2c71D9W9RzO8ZNg6SdcLAthwFvFtd3tl0khzbwF4XCVzIA6c78jk\n2Tzj4UiYHcyJLLdZ2Zu9+FSQNKGRh1JwQOjyAaijqH54TK1hfjZT+JFIcSTp\n52BiDgwak/DP7zW8ioUNgJVbnNxtpgIrh6dEHrD2UTEA7rAbt4ApOFl8m1xq\n9AhF+sFRVvZJByiFhE+zVsnX7348zLOc+1sB9JKuJRSZCtQydU1HYPBOchui\nldnmZpPO6HsL6pazA2qMOg/+kFUl8z4t2JTLCX5AxqOT4GDX/hQlj46vKfC1\nuP9kti+vQiij8dDhunJQJ7ol2DdZYqlLDVKrnGHHQGvPyzkzbHKz8oKpq/IJ\ndjCoEUFBHO4IsDGSTh+SzxiPowqqHQAWmkCD3hXRpkPi+/GBN76uZJ4+w+U6\nYYIazMESIAVU3V9ThXR8u9PEEyA7rUxv7AXnfTwdIf8NxwRZlspYzjYdlc0O\n3LOR\r\n=xRE6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDe36iBEAWTNaUMUce1PbzL2b50Bh2M2afek7gkrnD+nwIgdnjGR3S/qPeMB9p7ZE+mC/95HlQ4qDDIb8aPypjbQgE="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.19.0-alpha.35_1576581636174_0.738267800878111"},"_hasShrinkwrap":false},"0.19.0-alpha.36":{"name":"@react-ssr/static","version":"0.19.0-alpha.36","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.7.5","@babel/plugin-proposal-class-properties":"^7.7.4","@babel/plugin-proposal-object-rest-spread":"^7.7.4","@babel/plugin-syntax-dynamic-import":"^7.7.4","@babel/plugin-transform-runtime":"^7.7.6","@babel/preset-env":"^7.7.6","@babel/preset-react":"^7.7.4","@babel/preset-typescript":"^7.7.4","@babel/register":"^7.7.4","@babel/runtime":"^7.7.6","@babel/runtime-corejs3":"^7.7.6","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.3.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.0.4","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.8.0","node-sass":"^4.13.0","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.0","slash":"^3.0.0","terser-webpack-plugin":"^2.3.0","unionfs":"^4.2.0","urlsafe-base64":"^1.0.0","webpack":"^4.41.3","webpack-dev-server":"^3.9.0","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-node-resolve":"^6.0.0","@types/cheerio":"^0.22.15","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.0.1","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.8.0","@types/node":"^12.12.18","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.16","@types/react-dom":"^16.9.4","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.0","@types/webpack-dev-server":"^3.9.0","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.12.0","react-dom":"^16.12.0","rimraf":"^3.0.0","rollup":"^1.27.13","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-terser":"^5.1.3","typescript":"^3.7.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"946c5fce830a420de29d032fbea722b7d5bc7f14","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n- [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.19.0-alpha.36","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-eBjwxZp3UV9uXOPHQ+8QEORDICh/4YReTrfqgK/fpjGcp5so5BmLD9Oghhsqf3gl4AT/6SWqZKqQnx7nfBeWwg==","shasum":"c6d1342475a93b6189e87d34444c0381555fbf11","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.19.0-alpha.36.tgz","fileCount":43,"unpackedSize":329632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+LrOCRA9TVsSAnZWagAA0wgP/3PWhX+TxaocIjgjm8Lk\nrXlDu0oJfJNfVscJEZsQiiIRLZOE/v+D4jMn10f8/n+SZMeiaEKqnanLstAo\nshzccXavPa+YcMzKuLyLEB/VxJiBfdPcfnd6IvFR81yX04M1+FAPI72J8Clr\nrXEbB1fs8h7WwCb/QNfKUkxJEbKQH3UNsmmkwTUhYftfNiUWQbYRgfA7yA6k\nat4aspRyNd3ovPaRE4zEUSrb2BJg9a2/ZStBW22jJl+rf2+4WQ05klRYIIwq\nGIOMdtU8AN7iMzSsUai8Z86ykBvl/bYfy3xIXnZcjjTxU6+QPLoZqmBn1cPF\nwiUy/40JqNsWyvQ5NaabRUv7ji28JV6UQOyzUM+ubTAVg9OUdj30YdQNimVV\nsBb+L6fBuxVmKSpX/yUc2Tsaw7zy3BaerJ+WCjFZq93cMz1EKskqtKGNfSot\ndnQTX6HabCDv5jcImxP6XfSQeqFiJPWqkCnGMULnF2uy+qKaUEYn9p9hvA/s\n7RYwA6UcvIW1SlQfpg003mG2C2yB72EL3gnLAqapLx/3C4X0Vv5udHCiBITL\nhs0ROmSBXaxwT/kQevnNE5rdxKrAGhvCCCSl4Vt1keqo0AU/SaDm2oFVvtUg\ng7FNgWngy/fRBes6cJ+JhoOdpRaR6b7lwD2jouKpJFYt1P8x+dg72TtGlIcb\nXlLQ\r\n=E4hp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDE3OuQO3sgzyOcPGIrBeEtDbL6TZRySyX92v6vtH4mjgIgeFVnCtmuK2GwFKXgtKLbngSBt8+tZ7LAsimTo7qz9p0="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.19.0-alpha.36_1576581838005_0.0741974897266382"},"_hasShrinkwrap":false},"0.19.0":{"name":"@react-ssr/static","version":"0.19.0","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.7.5","@babel/plugin-proposal-class-properties":"^7.7.4","@babel/plugin-proposal-object-rest-spread":"^7.7.4","@babel/plugin-syntax-dynamic-import":"^7.7.4","@babel/plugin-transform-runtime":"^7.7.6","@babel/preset-env":"^7.7.6","@babel/preset-react":"^7.7.4","@babel/preset-typescript":"^7.7.4","@babel/register":"^7.7.4","@babel/runtime":"^7.7.6","@babel/runtime-corejs3":"^7.7.6","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.3.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.0.4","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.8.0","node-sass":"^4.13.0","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.0","slash":"^3.0.0","terser-webpack-plugin":"^2.3.0","unionfs":"^4.2.0","urlsafe-base64":"^1.0.0","webpack":"^4.41.3","webpack-dev-server":"^3.9.0","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-node-resolve":"^6.0.0","@types/cheerio":"^0.22.15","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.0.1","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.8.0","@types/node":"^12.12.18","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.16","@types/react-dom":"^16.9.4","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.0","@types/webpack-dev-server":"^3.9.0","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.12.0","react-dom":"^16.12.0","rimraf":"^3.0.0","rollup":"^1.27.13","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-terser":"^5.1.3","typescript":"^3.7.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"41fdc1f6aa9964a82b228f83d11e8a50f50774a6","_id":"@react-ssr/static@0.19.0","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-VtMAd2InmyJbzEzEv12Agxk8fLvwFBba03ahBG4Buk7rqD7z05Zjxi9XpHpcdL/joUe7Zma5kWDeolNDHXN1Jw==","shasum":"4010f2527d21ccd7c13c77625e99ffbd477f1ca4","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.19.0.tgz","fileCount":43,"unpackedSize":328337,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+MnBCRA9TVsSAnZWagAAtwsP/jsvFng3Cd17ucvitXLs\nORE014CTOyEQY4D4O5Xv3TafTtFiGKGzxAvrJnTrR92E2YQw/WA+Ww2xxzBf\nRV4YR6F3bEZ5lL4MyLwXDvbGwnwBIFVqLD+l8Iu52pkSSgal7VvZgFwxFUel\nRdImOijG+8rt3G0duaqKB3k90BgJ7hZOdQz3JX7meaDUKxkwTEn6IFPHNUTJ\nCnUy2MNlHLzVlAeS7VWNDlg8mZdM9XdYlmu0qTjLA6WtzpTAWdVBX4glZfpy\nCVzcioLxfOxS/A9GydK3z35q1i9eStl3VUHweggG1g2kyYcKZWG8eN6J4mFR\njI0EIzi7SnuWduEWSve/v66olAi62crtWatWtT38i8PgIO37rc+DpsmwpAnN\nFOTs9e+QOecZY+9BIFoF56YDR3kA0/2NHWJaq53XkrSIqzuheg6QsEqwEW8Q\nQE6TEYqGfZoBxcYwZyQtIUC+rwkH4eOJBmKtAfm7k8GvMBOnUd3f+qKFLQAX\nIqUdRaLap4vqJ4Qbi1pHugXalHmZCpiPP7D/9BoR19tEbCMzQGt74va3/lQb\nfSypw30pfcE2OdblSX6R2QlVFWF5SLpeopCSEWFqHeluL/XIjnl9NKtz8kM+\nf6dSppwmxEVuG43vLh48AJASftAEiImoWtuSi9xGY7CnejFLhAKj5eyuAznH\nda7/\r\n=i2cY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICS9oA0JR53dl6INSAWjfts/z7pymKHSb/usgmzVmNP+AiEAsjfbwugXKZtIm6MYb/EmGJI8ys9Hxe93NEcf0HX/+SY="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.19.0_1576585665042_0.41874731768967544"},"_hasShrinkwrap":false,"deprecated":"Deprecated: please use NEXT.js (https://github.com/zeit/next.js) or express-react-views (https://github.com/reactjs/express-react-views)"},"0.19.1-alpha.4":{"name":"@react-ssr/static","version":"0.19.1-alpha.4","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.7.5","@babel/plugin-proposal-class-properties":"^7.7.4","@babel/plugin-proposal-object-rest-spread":"^7.7.4","@babel/plugin-syntax-dynamic-import":"^7.7.4","@babel/plugin-transform-runtime":"^7.7.6","@babel/preset-env":"^7.7.6","@babel/preset-react":"^7.7.4","@babel/preset-typescript":"^7.7.4","@babel/register":"^7.7.4","@babel/runtime":"^7.7.6","@babel/runtime-corejs3":"^7.7.6","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.0","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.0.4","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.8.2","node-sass":"^4.13.0","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.0","slash":"^3.0.0","terser-webpack-plugin":"^2.3.1","unionfs":"^4.2.0","urlsafe-base64":"^1.0.0","webpack":"^4.41.3","webpack-dev-server":"^3.9.0","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-node-resolve":"^6.0.0","@types/cheerio":"^0.22.15","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.0.1","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.8.0","@types/node":"^12.12.18","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.16","@types/react-dom":"^16.9.4","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.0","@types/webpack-dev-server":"^3.9.0","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.12.0","react-dom":"^16.12.0","rimraf":"^3.0.0","rollup":"^1.27.13","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-terser":"^5.1.3","typescript":"^3.7.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"069663a17e44cfc95a0991378585bd6ffa774752","readme":"## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/static react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"static\",\n    \"build\": \"static build\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ]\n}\n```\n\n**`static.config.js`**:\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n  },\n};\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index() {\n  return <p>Hello Static Site</p>;\n}\n```\n\nFinally,\n\n- run `npm run dev` and you'll see `Hello Static Site` in your browser.\n- run `npm run build` and you'll see the static files in the dist directory.\n\n## Configuration (`static.config.js`)\n\nHere is the default `static.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: 'dist',\n  viewsDir: 'views',\n  port: 3000,\n  routes: {},\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `static.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `static.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `static.config.js#distDir`\n\nThe place where `react-ssr` generates static files. (default: `dist`)\n\n### `static.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\n### `static.config.js#port`\n\nThe port of the development server.\n\n### `static.config.js#routes`\n\nThe key is the route, and the value is the path from the views directory.\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n    '/profile': 'profile',\n    '/login': 'auth/login',\n  },\n};\n```\n\n### `static.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = () => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/static';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n- [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.19.1-alpha.4","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-ehkD+7yvv/6Rlp7VNk1k9a4w4AeSWTnnR9vRpVoqzW3De5fEQPxEZCFJxpG6AKrAL8fPP8IiK2n8MfAyKRy50A==","shasum":"31a7c9df02316073e655fa3a77ca6e0db391c190","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.19.1-alpha.4.tgz","fileCount":43,"unpackedSize":328899,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+VeHCRA9TVsSAnZWagAAhtQQAJcLFp5jOB20FdMfxaBz\nQj+tfvkJ/sSZNjwjfYknMRak+E46ySR48hoAWzWEhKocwrnM8Zkn84EktDHv\n2J1iZ9CAEq0asPv4Cq5JUUXWlQ1rOzqWepNisrg+cgS+MtsIKqSOlYsBR2B/\nZMuxrakpPC7F7Ybx/4ChLkRZ1JLlJswbPYTN5n8AXKxBamZsukrtF47bfjdS\n416iN3ZJ2tZA35HWIenjWBTBq6KGBzQuaUyger2R7LGOEOSuDA/YJCQ/nzJh\nDhUqT/shQgV9jsighQdcsPK9ICoy44g9w9TcZW2WI4pbz/UI1nH8zjLIEJkz\nUX/ffkN7h1LhsJ1haMVSKOsAMgVDi5O842nm7kh5Z7fjMztWcYqmtD8Szu6H\noV2jRCmlOG3Q3g126jsH5rIzgVrz91hifYSfX3fOEGUwawciKM1JOogqI6rA\nZ6E3TVc3npxZS8i2Bd7rXwVKm03yCCCnQ0Dm778s1Yb+damqJExn+BLfgEVQ\n1LXzjr7VqA4R8hc1kchTWDMquD10ZV7Bvm9AXK+26yUm7A9wBOyEJ6DfMR4t\nw3TWTA54QGfDAgpSG0fPk0gF+zk8tjS24PmJz5wtafTQDxOLuktdBqKmSGqo\nvdBjG9C1/9oNeImJusZ+jDs9oo1cvqmkzL1YUIwqhig/5lHURGl5ccpJL1wM\ng7cT\r\n=1n9L\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDGLOoqagQ9lT6cXuicFvowIBicxr/825sbXhuYNXKh0gIhAM1fPdWJ3kmqzMuEUmWDVKITJefGAs3hohJ4aokRaVgG"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.19.1-alpha.4_1576621959029_0.966562396669999"},"_hasShrinkwrap":false},"0.19.1-alpha.5":{"name":"@react-ssr/static","version":"0.19.1-alpha.5","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.7.5","@babel/plugin-proposal-class-properties":"^7.7.4","@babel/plugin-proposal-object-rest-spread":"^7.7.4","@babel/plugin-syntax-dynamic-import":"^7.7.4","@babel/plugin-transform-runtime":"^7.7.6","@babel/preset-env":"^7.7.6","@babel/preset-react":"^7.7.4","@babel/preset-typescript":"^7.7.4","@babel/register":"^7.7.4","@babel/runtime":"^7.7.6","@babel/runtime-corejs3":"^7.7.6","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.0","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.0.4","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.8.2","node-sass":"^4.13.0","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.0","slash":"^3.0.0","terser-webpack-plugin":"^2.3.1","unionfs":"^4.2.0","urlsafe-base64":"^1.0.0","webpack":"^4.41.3","webpack-dev-server":"^3.9.0","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-node-resolve":"^6.0.0","@types/cheerio":"^0.22.15","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.0.1","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.8.0","@types/node":"^12.12.18","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.16","@types/react-dom":"^16.9.4","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.0","@types/webpack-dev-server":"^3.9.0","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.12.0","react-dom":"^16.12.0","rimraf":"^3.0.0","rollup":"^1.27.13","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-terser":"^5.1.3","typescript":"^3.7.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"559764cfa0423fbf83ba3cf8a7e00108210b0058","readme":"## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/static react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"static\",\n    \"build\": \"static build\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ]\n}\n```\n\n**`static.config.js`**:\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n  },\n};\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index() {\n  return <p>Hello Static Site</p>;\n}\n```\n\nFinally,\n\n- run `npm run dev` and you'll see `Hello Static Site` in your browser.\n- run `npm run build` and you'll see the static files in the dist directory.\n\n## Configuration (`static.config.js`)\n\nHere is the default `static.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: 'dist',\n  viewsDir: 'views',\n  port: 3000,\n  routes: {},\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `static.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `static.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `static.config.js#distDir`\n\nThe place where `react-ssr` generates static files. (default: `dist`)\n\n### `static.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\n### `static.config.js#port`\n\nThe port of the development server.\n\n### `static.config.js#routes`\n\nThe key is the route, and the value is the path from the views directory.\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n    '/profile': 'profile',\n    '/login': 'auth/login',\n  },\n};\n```\n\n### `static.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = () => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/static';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n- [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.19.1-alpha.5","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-cZJ3jTUZ8KE2/2FNq1PLroi/Z0f8lHn8iuev0TdYI3tQ0iSVAuK1+D98ac2ywBNkI89/P5bNhWs0gZuhQ5vbkA==","shasum":"a99fe5a67748c605fac39f6b7d2cc56dea9df5b7","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.19.1-alpha.5.tgz","fileCount":43,"unpackedSize":328887,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+WAxCRA9TVsSAnZWagAAPvcQAJwHL+E2glr80s5MYMbx\nwjNENenFV1DqSlNh1IMGoZC0hzjeeGk5lWgXJNK0Z1avJNyg9cTfMWG2eraC\np1mjQY2tSKutlWOmUvB0d9amLX7zyYabOQiZB2Zfu1RwjQUijYf7xAbJhlWu\n69OtS7LFY9t3aAyvFTB9orX+obrWIYFPjBhY3XWTAxoXukSMazrBuUeXWhar\nm1WKZ2yy/FkAUMeM7dNHfu1CdErsTzcKgKknKiDCDW9XGVcf36U5iScZMae6\ntH1uBBpjJ9n+kyhdRPAIFQfze420TSPbWXmRMXmA/uaOSEAHONMTc4hMU2sh\n2HAUiF5D2+sXfbqQkbm/pKLMvPtXsKJG1wVZOrGAD8maj0VJCB7vHMBILuTr\nPsd2wDeSZBz5L1/koXq4Ft2vp5d1hVFUQGA5K1Ye7rH53+FyToHezUAUa/TN\nWNJyzxt3V0UjHpQqYJx+Y8qSPIl0RdfozVjfvGB9rxlWZgcvxfgy197pjjtX\n/tEvZ50oVEAItyPEdTj0Ix5adUqB9AADkG1xEFE1wfh4XboUQauuKs7h2/Vp\nLjzh2USYKyW8Sn/JC8vV8ossUEaZmqisVvfV0rTcDW0dGxWj/JosoNga/zBV\nWnxnU/ToJQfmJZsez+GKHjgTENtpO2He5e+2brWujrpRpOQkzuUSPsDnFgNT\nuqBt\r\n=yymi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBfXaaxZPJUA2eZDhCaBH4sFBmrbeTOYH2tNPE2MHwnFAiAXZuaPEpOJIwo6Z+nTJ4RgNJfzpnMofR3nxhTIVarsDw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.19.1-alpha.5_1576624177265_0.8410915276766187"},"_hasShrinkwrap":false},"0.19.1-alpha.6":{"name":"@react-ssr/static","version":"0.19.1-alpha.6","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.7.5","@babel/plugin-proposal-class-properties":"^7.7.4","@babel/plugin-proposal-object-rest-spread":"^7.7.4","@babel/plugin-syntax-dynamic-import":"^7.7.4","@babel/plugin-transform-runtime":"^7.7.6","@babel/preset-env":"^7.7.6","@babel/preset-react":"^7.7.4","@babel/preset-typescript":"^7.7.4","@babel/register":"^7.7.4","@babel/runtime":"^7.7.6","@babel/runtime-corejs3":"^7.7.6","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.0","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.0.4","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.8.2","node-sass":"^4.13.0","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.0","slash":"^3.0.0","terser-webpack-plugin":"^2.3.1","unionfs":"^4.2.0","urlsafe-base64":"^1.0.0","webpack":"^4.41.3","webpack-dev-server":"^3.9.0","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-node-resolve":"^6.0.0","@types/cheerio":"^0.22.15","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.0.1","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.8.0","@types/node":"^12.12.18","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.16","@types/react-dom":"^16.9.4","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.0","@types/webpack-dev-server":"^3.9.0","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.12.0","react-dom":"^16.12.0","rimraf":"^3.0.0","rollup":"^1.27.13","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-terser":"^5.1.3","typescript":"^3.7.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"cc74edc140c82cd59dea9dca0cc32d9412e535a7","readme":"## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/static react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"static\",\n    \"build\": \"static build\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ]\n}\n```\n\n**`static.config.js`**:\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n  },\n};\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index() {\n  return <p>Hello Static Site</p>;\n}\n```\n\nFinally,\n\n- run `npm run dev` and you'll see `Hello Static Site` in your browser.\n- run `npm run build` and you'll see the static files in the dist directory.\n\n## Configuration (`static.config.js`)\n\nHere is the default `static.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: 'dist',\n  viewsDir: 'views',\n  port: 3000,\n  routes: {},\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `static.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `static.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `static.config.js#distDir`\n\nThe place where `react-ssr` generates static files. (default: `dist`)\n\n### `static.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\n### `static.config.js#port`\n\nThe port of the development server.\n\n### `static.config.js#routes`\n\nThe key is the route, and the value is the path from the views directory.\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n    '/profile': 'profile',\n    '/login': 'auth/login',\n  },\n};\n```\n\n### `static.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = () => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/static';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n- [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.19.1-alpha.6","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-m1hM0IyGrkHoTw2km2llfdat1Es8S9+3OiO4lkhGFgAySrkhsOcbfKor+7vUBEr9tSUIkAT7LiI/r2IUpNLDMw==","shasum":"a0cd66a2bee2f61724793524e34ac33696404759","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.19.1-alpha.6.tgz","fileCount":43,"unpackedSize":329229,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+WHXCRA9TVsSAnZWagAAzKgP/0bDYRqOcs2ydOg5fLKW\nqTWjoS2B2N8jrZDXbyPOk2h4Q/01vNSIIJAjcvu+J7NCcEAjtGxPq5+y9Idc\n3yEb5p9Kn4G4zfbJ4pewzcZ31SsIlJs90gpICB6BBbszdvv+DEqhxfEBcTYK\nRwM/sW4CytkoOOhbD6az/ppzy3UETV8t5J5NOPSrvI6FeBr2U7A/2Y+iaP3G\nroOmoGkGobQoIjAZ7jk96G3BIxWcS3ow1Q2/cOaYhDZ7l1GPb6WRrfNpYGOq\nSYJ7DUWiuD+Q3JMQ6YKWPNtTD6RDGg8AW6sxTyBv6hmbsVtgXbTHdor3gQT0\nUMasRFieM0GGG88QXQQBHyL+QgaHagei9V6Z6MBeNnynKms2zCr6MsiWlKnL\n/X2vv3HV8pCtY/KaeFnfQW7ZDgqM2w5YE/RuocXSjzAybrXntxJyOix0XEiM\n+dOYUGQiO+xrG+PitASw0zqmvmt8LJp7zQJEVGCIPdyaiLtK4bIsZYTXps4h\nfiqMxLbUfDz/rAPEO4rmkeqS6y8VgmkUg4ntz373qCIvxxZrykW1Rl/dcvsC\nJili/nxW4XryB51oir/sgKilpeRdhA38NNOnFx8bkqC5RF6ZVBxiDZidlSGF\nutq1rsHIc8ZTmpdWWy9650nTj7ZdmL+Xyy2XRQe/A8GRmrmL9tuHtZUfZ2ap\nIeCY\r\n=kY3O\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGHWrjJ3D2rkx0Z+k4PRe3nG9I1pbSFUyrrKgQeMO3RPAiEAuio3+QneJ0qTzVqFg+T+Q6S1KM8lbys28WJFJOkW+og="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.19.1-alpha.6_1576624599172_0.7763363872864595"},"_hasShrinkwrap":false},"0.19.1":{"name":"@react-ssr/static","version":"0.19.1","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.7.5","@babel/plugin-proposal-class-properties":"^7.7.4","@babel/plugin-proposal-object-rest-spread":"^7.7.4","@babel/plugin-syntax-dynamic-import":"^7.7.4","@babel/plugin-transform-runtime":"^7.7.6","@babel/preset-env":"^7.7.6","@babel/preset-react":"^7.7.4","@babel/preset-typescript":"^7.7.4","@babel/register":"^7.7.4","@babel/runtime":"^7.7.6","@babel/runtime-corejs3":"^7.7.6","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.0","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.0.4","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.8.2","node-sass":"^4.13.0","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.0","slash":"^3.0.0","terser-webpack-plugin":"^2.3.1","unionfs":"^4.2.0","urlsafe-base64":"^1.0.0","webpack":"^4.41.3","webpack-dev-server":"^3.9.0","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-node-resolve":"^6.0.0","@types/cheerio":"^0.22.15","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.0.1","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.8.0","@types/node":"^12.12.18","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.16","@types/react-dom":"^16.9.4","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.0","@types/webpack-dev-server":"^3.9.0","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.12.0","react-dom":"^16.12.0","rimraf":"^3.0.0","rollup":"^1.27.13","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-terser":"^5.1.3","typescript":"^3.7.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"0adc0bde4d9131dbc4cf8f10986cec43afcbab62","_id":"@react-ssr/static@0.19.1","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-SP5wJlrrbb9utorAy91Ro56UNSGxA60S1esFZSbyAELozHaM8JvMm86FsA/8Gzjeoe1mTCTxu1cQHp33f2yJ1A==","shasum":"3380473cee8c6f03f42414ac5cfbcd8454355ad7","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.19.1.tgz","fileCount":43,"unpackedSize":330165,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+WrxCRA9TVsSAnZWagAAOsgP/jzAocoMxPK1uhT+KpDn\nU+oglqTHaZCZuahK0YV08siy3pVr+ZV8mDZMH6K7m9W07H763HujFn4UmSvY\n3J32qEXmgBsZtTRvaH/eXi6nUWzphab+Lk51+ilFIk1TuCUjtaRjMS1cDNrN\naqGGjLJ6zfkaBWPsQYZe59iLiAx/mEWZjFtL9kFHDmAeArbSo8K3hL9BqpyO\nvwfbwcc5gBgobY9DqAmWYa0N5SKZq9Bqw9KUq0dyUY6zsQAcrnhZs+ekSjFZ\nL6jOxXMswsNDoTYG1VWxf0YU0OZt1ll07/QZGUT5QuMuLfKXIVt/5nVUKL6j\n2ED2BSfzw6aN/MJMX/wzCfEOoWNGb7uPyLH1xxVm56xYGQtOaZbXQNDpmUxt\n+c7AxvVd2V2i/M/ikZdK+ct0cEcqU6NTOv0Vwu5H5cYipqVgsU1/r1ACYW1G\nZDIllb9uXOSnC3YPKRFMlaycR+dVSfuKo7u2XcaybZnpxDeJFHk29osk5NW9\nxvRUd0HnQYpLuuN6QzZGPmpjSexZT0ZTiokH3nD63fGxYKZKm7pgLg0/pDAC\n356ZF/BnwWAKoDNQllWyyBOJkQU+oUV5XUKdKXTCkcjjNe04dF6IpRkUdHAp\nsSdZNcPyUe9zDHQMXXOCDvw3sDvKsr8t9qixwSSYW9Vi0klh1l8ngWIXsM5b\nxzY6\r\n=hGul\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAROqlvcGF498yBDp+W+8IfgMwcMRFGok6pzVhvx+ZTeAiEAqVKfUtxFgiYt3++fMxVt3Flw7Px8puT53JdIlo6LOMU="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.19.1_1576626929282_0.08930595146911924"},"_hasShrinkwrap":false,"deprecated":"Deprecated: please use NEXT.js (https://github.com/zeit/next.js) or express-react-views (https://github.com/reactjs/express-react-views)"},"0.19.2":{"name":"@react-ssr/static","version":"0.19.2","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.7.5","@babel/plugin-proposal-class-properties":"^7.7.4","@babel/plugin-proposal-object-rest-spread":"^7.7.4","@babel/plugin-syntax-dynamic-import":"^7.7.4","@babel/plugin-transform-runtime":"^7.7.6","@babel/preset-env":"^7.7.6","@babel/preset-react":"^7.7.4","@babel/preset-typescript":"^7.7.4","@babel/register":"^7.7.4","@babel/runtime":"^7.7.6","@babel/runtime-corejs3":"^7.7.6","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.0","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.0.4","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.8.2","node-sass":"^4.13.0","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.0","slash":"^3.0.0","terser-webpack-plugin":"^2.3.1","unionfs":"^4.2.0","urlsafe-base64":"^1.0.0","webpack":"^4.41.3","webpack-dev-server":"^3.9.0","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-node-resolve":"^6.0.0","@types/cheerio":"^0.22.15","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.0.1","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.8.0","@types/node":"^12.12.18","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.16","@types/react-dom":"^16.9.4","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.0","@types/webpack-dev-server":"^3.9.0","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.12.0","react-dom":"^16.12.0","rimraf":"^3.0.0","rollup":"^1.27.13","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-terser":"^5.1.3","typescript":"^3.7.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"d413aa845be5778e5be729ca8e95ca1c85a0eae5","_id":"@react-ssr/static@0.19.2","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-VTeFrlaiPS3YuBAn5tpNymTJ7s+TMmDYHYLzt2rUXhhgElWL2RXNgPBHW2Se0HFW1JaafFcnQcjrAeVtkKslbw==","shasum":"43de0c1f330523964290c934dde75ebe77981262","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.19.2.tgz","fileCount":43,"unpackedSize":330782,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+ZvGCRA9TVsSAnZWagAAWaIP/Arofk8XAIl+Wv3sWxJa\niQpwTln87e2qOGCDwRMTymD1HHwGCtfMgTzxb7JEfPQR0A4alh9Zwy7TCw63\nWRmyMK8kyTKTyR3Sy8dhuwn71vwofw1LYJEl+GtkzET5X/IbzXSPn4vubmmM\nJDIYkuTqTCQY51oIhVicCVjBbyLJ5oCyPoR+Yftjnl10E5TClt8YB/c2/63X\n7NxmzC0XtLi2dk3ce5bEyYCaEcgYFvrtG17X8dNy+JHa/xkEw+6rWLW2C9vF\niSoi7wuUgGuutCOHosjorOKJAc15HhKrSvzFeja/JjPE+XwGMKzzPxhBfjqn\njJBxTKD06N/0tSInTwNDDVv8zbfhE9FsCF03c7VnvkC8VRkiC0NzCoWiDbgl\nWwfEp3iGD6a8JG+rfU8XTCbNskm0jf3DNRtZXvTXz9PrJo9dBeI0Q6dx4wnE\nxozzZgtB2kLYi4VQf89OR+byd12AGTthFzUIF2/4eRGuR9fXWPm57M3AugL/\nKt8Fm8Vzhji3qtiFD97dikpHKq09IEKO4tEbshEEm2v9WIawCJsVocbewL/d\nueOb00oChPlG+EgECLsuu+0xr8VJrOugbFkw/6lxg9EBFaVughQhPgsDe0nB\nZDYHUuipGTJ7TR2LrUxXkGu6iab+aBGUJ3ItX/KgxGs+19CDGImC9ahm2lz+\nD/jG\r\n=1ZlE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBfO2Nj5B2CpxUHvkYGW4rB7imgh3sRre0WUK8NPSu5lAiBIeePUtfuJQt2143ZljK5m7BWuE6xnG2ZZ6fKoZ6I1Mw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.19.2_1576639430066_0.26672301402269083"},"_hasShrinkwrap":false,"deprecated":"Deprecated: please use NEXT.js (https://github.com/zeit/next.js) or express-react-views (https://github.com/reactjs/express-react-views)"},"0.19.3":{"name":"@react-ssr/static","version":"0.19.3","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.7.5","@babel/plugin-proposal-class-properties":"^7.7.4","@babel/plugin-proposal-object-rest-spread":"^7.7.4","@babel/plugin-syntax-dynamic-import":"^7.7.4","@babel/plugin-transform-runtime":"^7.7.6","@babel/preset-env":"^7.7.6","@babel/preset-react":"^7.7.4","@babel/preset-typescript":"^7.7.4","@babel/register":"^7.7.4","@babel/runtime":"^7.7.6","@babel/runtime-corejs3":"^7.7.6","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.0","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.0.4","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.8.2","node-sass":"^4.13.0","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.0","slash":"^3.0.0","terser-webpack-plugin":"^2.3.1","unionfs":"^4.2.0","urlsafe-base64":"^1.0.0","webpack":"^4.41.3","webpack-dev-server":"^3.9.0","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-node-resolve":"^6.0.0","@types/cheerio":"^0.22.15","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.0.1","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.8.0","@types/node":"^12.12.18","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.16","@types/react-dom":"^16.9.4","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.0","@types/webpack-dev-server":"^3.9.0","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.12.0","react-dom":"^16.12.0","rimraf":"^3.0.0","rollup":"^1.27.13","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-terser":"^5.1.3","typescript":"^3.7.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"5a832d2c5f20fc9f0e9a0a54f4a4dbdfba0c077c","_id":"@react-ssr/static@0.19.3","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-3iVN7GmJr6fgJpWNIezCNsgNOKP3LVj/R5InW7BcphvjdZ25+7Nq/LDRPIYUWxZMVusHoNCm85t00F+/GZLe0A==","shasum":"0217beb01eec85286a805d0cd3cc986c61d8a05b","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.19.3.tgz","fileCount":43,"unpackedSize":330861,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+eBnCRA9TVsSAnZWagAADBkP/j+g1w/8YVGLydmUn/f2\n3tZKOrsSPJNceIpxLmR7SAFao86C3/9SFZHgxwh/Bjwg6cv4Bk02ZvZHGn4H\nmulEi/lFnT97q/z1meOCbSUGVM1/FfRjo7xtkqs6rR/cuu6SnFRw8hrln7Iq\n30Gcpd65K5M3T9hojWSzHTK7nSeg/zo3Cd8i+DJTWZ5a8lIycO6f3i2s3F0+\n1tr5g36cfdW/ANGj6lDykY/VE7UIHJqb7pf59DLcNQ44CMEkE/Ofe5PZ7vmL\nUz6O4cmIVZyRlQ/ohJnpf4J+c2wDIJe2N3ld95yvqnlNnVhJvYfqW5h6lK+X\nbZY9Kf1Bvhxwc5NVUKhpZY3OLXbZdzrw8YR1wE9tGfXt39Tb0DjDHWWs6O9l\n6BiS8wAvgU4QdNJVKX8UeTzY53qAZiknWPKUxjMADlpzxPj2yHIvF9AgENLg\n8OXx7d94xzuhvZ1GrP3+M17myGXLI46kyAMn5E/Aa7Zoiy69mnrq6JA4Km6p\nzhkpW1zD8ei3sVaJtcqdYq2aehZ/U2Bqar3XzzOGMYBN4mZDLSXy4sNb0eWO\nLGBXqBZyo11eWzn8MjJoKP6B2ZHYF8VpENvlCvOuXDnGNBuBSYSvKJtghPmq\naqSKFTFkxFzFVdcsCGaAGNK5XguPWn7e08twkSQv9uwb2RPn4KeiD0BchS7N\nd3Eq\r\n=RrVx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHRPpMDeUct00jcAJtxuxKxWbwi95vtzocWrYukUjMu8AiEA84Uz+F4s1ll/W82ncMud6RaXg+37DHif/92idRQc91I="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.19.3_1576656998573_0.5819655176867997"},"_hasShrinkwrap":false,"deprecated":"Deprecated: please use NEXT.js (https://github.com/zeit/next.js) or express-react-views (https://github.com/reactjs/express-react-views)"},"0.19.4-alpha.1":{"name":"@react-ssr/static","version":"0.19.4-alpha.1","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.7.5","@babel/plugin-proposal-class-properties":"^7.7.4","@babel/plugin-proposal-object-rest-spread":"^7.7.4","@babel/plugin-syntax-dynamic-import":"^7.7.4","@babel/plugin-transform-runtime":"^7.7.6","@babel/preset-env":"^7.7.6","@babel/preset-react":"^7.7.4","@babel/preset-typescript":"^7.7.4","@babel/register":"^7.7.4","@babel/runtime":"^7.7.6","@babel/runtime-corejs3":"^7.7.6","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.0","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.0.4","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.8.2","node-sass":"^4.13.0","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.0","slash":"^3.0.0","terser-webpack-plugin":"^2.3.1","unionfs":"^4.2.0","urlsafe-base64":"^1.0.0","webpack":"^4.41.3","webpack-dev-server":"^3.9.0","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-node-resolve":"^6.0.0","@types/cheerio":"^0.22.15","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.0.1","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.8.0","@types/node":"^12.12.18","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.16","@types/react-dom":"^16.9.4","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.0","@types/webpack-dev-server":"^3.9.0","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.12.0","react-dom":"^16.12.0","rimraf":"^3.0.0","rollup":"^1.27.13","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-terser":"^5.1.3","typescript":"^3.7.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"9bc62bbb434b7d8006606a0753e12e035ff8e588","readme":"## Overview\n\n- Static site generator by using React SSR (Server Side Rendering)\n- Developer Experience\n  - Dynamic `Head` component for better SEO\n  - HMR (Hot Module Replacement) when `process.env.NODE_ENV !== 'production'`\n  - Automatically reflect to the browser as soon as you save the scripts and even if styles\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/static react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"static\",\n    \"build\": \"static build\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ]\n}\n```\n\n**`static.config.js`**:\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n  },\n};\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index() {\n  return <p>Hello Static Site</p>;\n}\n```\n\nFinally,\n\n- run `npm run dev` and you'll see `Hello Static Site` in your browser.\n- run `npm run build` and you'll see the static files in the dist directory.\n\nA working examples are here:\n\n- [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n- [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n- [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n\n## Configuration (`static.config.js`)\n\nHere is the default `static.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: 'dist',\n  viewsDir: 'views',\n  port: 3000,\n  routes: {},\n  publicPaths: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `static.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `static.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `static.config.js#distDir`\n\nThe place where `react-ssr` generates static files. (default: `dist`)\n\n```js\nmodule.exports = {\n  distDir: 'out',\n};\n```\n\n### `static.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\n```js\nmodule.exports = {\n  viewsDir: 'pages',\n};\n```\n\n### `static.config.js#port`\n\nThe port of the development server. (default: `3000`)\n\n```js\nmodule.exports = {\n  port: 4000,\n};\n```\n\n### `static.config.js#routes`\n\nThe key is the route, and the value is the path from the views directory.\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n    '/login': 'auth/login',\n  },\n};\n```\n\n### `static.config.js#publicPaths`\n\nThe place where we put static files like images.\n\n```js\nmodule.exports = {\n  publicPaths: [\n    'public',\n  ],\n};\n```\n\n### `static.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = () => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/static';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.19.4-alpha.1","_nodeVersion":"12.14.0","_npmVersion":"lerna/3.19.0/node@v12.14.0+x64 (darwin)","dist":{"integrity":"sha512-/WjWIoVGwjeqgoO3yCalZL8TStwZLiVzaRZBbvrRqfdADFXEyPygUWuS8QulfLbHPsxCKr/ESulri9AowVpmZA==","shasum":"8c8a272a9c667a622edd13d343cf3bcf6836b1f6","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.19.4-alpha.1.tgz","fileCount":43,"unpackedSize":330719,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+oXuCRA9TVsSAnZWagAAtwAQAIj9gDHBfg82qcwCa4T+\n6PAWoBe7C8aD4XRRQtp8Xt1rN0lyJELsAzWBefcKlFcpwLy9JJPf4hVm2zKl\nyuTlLDg2c57jz0o51/nlG2Y0QIcF+/JSr+6QmQ4xzcwzASF5xDExXlRai3qb\n9f0wsW/5rff4fmkdKFagBKIIsVByt35qOr9OoPY6EIdiZHiWDZjqJ+uhS5dt\nEm2KXwSGxEsQRX9cWbsmUmBKv2UqsM/0hbFCaFZTDMGt9wm88SrnF1BU120P\nWET/WCI5TmrLFn9PbpvhYINUmahhG1+zZ5rtITaDlH0HClY2HzgLy7777oOC\nhy4j0ro0akUqBBEnLBUeAN1pkQx8Qjiw6AT3r6dOqeLTsfi4KJYYXgxUEJ+b\nxQfa9xkOYvB70D82RtHiG2E0c9DsyfPqEdSYSTtyZWRDnyF1lQ1YdhKrc6jI\nowpTH8TvDHk/KfHv/FZKYN/LIbR0HHsJT3D2zP6AMt92fnYBVdi7v5V7annD\ntlkv4Trmai5/b+wPdHseO9cbDLzca0BBieA3OaxGY9sosiZB21yACdw6NjF7\nQuNXjOmLj5p+1U+A7vIoK2hcpALF6zEsNfhk2LbKrjFpMmODmbI74eEZVuEe\nbxYQP3K6wSQ9uQ4D+22na/QA5V4RCbPONVLTDcP7aPvDbErYeN86GuuikBNr\n4mto\r\n=Gefx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHxEjCZxwtXgkmfmQNdqKsv9hg5uQgRuC/WbR5RCbd+nAiABWHVrH5Mt6nyG5UboekmrxcK2gahFXcYqfQZVBzSclQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.19.4-alpha.1_1576699374073_0.4255486211939066"},"_hasShrinkwrap":false},"0.19.4-alpha.3":{"name":"@react-ssr/static","version":"0.19.4-alpha.3","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.7.5","@babel/plugin-proposal-class-properties":"^7.7.4","@babel/plugin-proposal-object-rest-spread":"^7.7.4","@babel/plugin-syntax-dynamic-import":"^7.7.4","@babel/plugin-transform-runtime":"^7.7.6","@babel/preset-env":"^7.7.6","@babel/preset-react":"^7.7.4","@babel/preset-typescript":"^7.7.4","@babel/register":"^7.7.4","@babel/runtime":"^7.7.6","@babel/runtime-corejs3":"^7.7.6","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.0","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.0.4","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.8.2","node-sass":"^4.13.0","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.0","slash":"^3.0.0","terser-webpack-plugin":"^2.3.1","unionfs":"^4.2.0","urlsafe-base64":"^1.0.0","webpack":"^4.41.3","webpack-dev-server":"^3.9.0","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-node-resolve":"^6.0.0","@types/cheerio":"^0.22.15","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.0.1","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.8.0","@types/node":"^12.12.18","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.16","@types/react-dom":"^16.9.4","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.0","@types/webpack-dev-server":"^3.9.0","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.12.0","react-dom":"^16.12.0","rimraf":"^3.0.0","rollup":"^1.27.13","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-terser":"^5.1.3","typescript":"^3.7.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"7a34a39da5ae1bac19a1256fe549dc719720fabb","readme":"## Overview\n\n- Static site generator by using React SSR (Server Side Rendering)\n- Developer Experience\n  - Dynamic `Head` component for better SEO\n  - HMR (Hot Module Replacement) when `process.env.NODE_ENV !== 'production'`\n  - Automatically reflect to the browser as soon as you save the scripts and even if styles\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/static react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"static\",\n    \"build\": \"static build\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ]\n}\n```\n\n**`static.config.js`**:\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n  },\n};\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index() {\n  return <p>Hello Static Site</p>;\n}\n```\n\nFinally,\n\n- run `npm run dev` and you'll see `Hello Static Site` in your browser.\n- run `npm run build` and you'll see the static files in the dist directory.\n\nA working examples are here:\n\n- [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n- [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n- [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n\n## Configuration (`static.config.js`)\n\nHere is the default `static.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: 'dist',\n  viewsDir: 'views',\n  port: 3000,\n  routes: {},\n  publicPaths: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `static.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `static.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `static.config.js#distDir`\n\nThe place where `react-ssr` generates static files. (default: `dist`)\n\n```js\nmodule.exports = {\n  distDir: 'out',\n};\n```\n\n### `static.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\n```js\nmodule.exports = {\n  viewsDir: 'pages',\n};\n```\n\n### `static.config.js#port`\n\nThe port of the development server. (default: `3000`)\n\n```js\nmodule.exports = {\n  port: 4000,\n};\n```\n\n### `static.config.js#routes`\n\nThe key is the route, and the value is the path from the views directory.\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n    '/login': 'auth/login',\n  },\n};\n```\n\n### `static.config.js#publicPaths`\n\nThe place where we put static files like images.\n\n```js\nmodule.exports = {\n  publicPaths: [\n    'public',\n  ],\n};\n```\n\n### `static.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = () => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/static';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.19.4-alpha.3","_nodeVersion":"12.14.0","_npmVersion":"lerna/3.19.0/node@v12.14.0+x64 (darwin)","dist":{"integrity":"sha512-k3y9oJPzZLt6R8jVoiAjltF4/kMoCvjKmfqn2BsZYfv4viIXi5sqIJHB2wMzgOv9lu8LjkBxED/OQzdZhztF5w==","shasum":"44288e282db547e849893af5e031097f1364d247","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.19.4-alpha.3.tgz","fileCount":43,"unpackedSize":330550,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+oiqCRA9TVsSAnZWagAAHxoP/185Og3bDe8Wap69/U0A\n3YXlU+cEKp0pGu/Ls01P/ccNyZ8KYnA5VzLaI9N5QAQkiD23Ue3R6Go18Dsr\niwQvHJlV2HnbaoZMbszfFkbIflLrQQOnwJNUpMhtuIx/egDn3n4aO+odsqxf\nPYEIYc10eEt2CGa21MBOu6yerLlQGqc5vb1nbHWAIxedoAV/AC96I+G9mjO5\nNBQIkSGCBOfAJ02aW0GH5BdZjN3KRPaA9ARlIvkIA2BsLBNS3lPLk1bMerbk\nxNlJ4Qn9d5ZQxmi9OIvOzDhYpAufxFr2keg5dIE/t6GdmUaDlC8/Zntbl8Hg\n1ftXLhdGmzsWMBVIVUfbNSdDcN0erQknSZpTyw+u6uwN94ZD59dPTcCdNIaH\na8FjDi8tf7VhA5bdB9x9EedJ885/dx+woSMVZufgFUd5hBtK20ZCj2JR5ZWx\nDLbCZyS/YCnXkDhRfyqvHsd7Qxo/M2l/7uOK4zKUwfTIzY1Aya7bxkhVEvuV\nRSWDDS2D26BaPSM3Ah2Hdd9oCjwYAcPxP9y0exyjhzVnalklrDkaOLV+93VG\nhGMcD3L4z47zTYpvKSQe/kkWr6hEetFSPIXZSVDWaR4msTS7S17EqKpLogUi\nnLxzEEXf1XaBl0iPB1V2O7KlRdFdlhQd1p2M7eEoK1L/W3oVgCPzhr1z751m\nij9r\r\n=2erD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG8NfC0SbX6fuNFgSjnzpMM3UeZpmDeyJeQkvXnHvr63AiEAng64JLuOMXyb3F2cMha+jF9gs70s+RknjfoFBCzY+ac="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.19.4-alpha.3_1576700073672_0.6077178646667873"},"_hasShrinkwrap":false},"0.19.4-alpha.4":{"name":"@react-ssr/static","version":"0.19.4-alpha.4","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.7.5","@babel/plugin-proposal-class-properties":"^7.7.4","@babel/plugin-proposal-object-rest-spread":"^7.7.4","@babel/plugin-syntax-dynamic-import":"^7.7.4","@babel/plugin-transform-runtime":"^7.7.6","@babel/preset-env":"^7.7.6","@babel/preset-react":"^7.7.4","@babel/preset-typescript":"^7.7.4","@babel/register":"^7.7.4","@babel/runtime":"^7.7.6","@babel/runtime-corejs3":"^7.7.6","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.0","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.0.4","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.8.2","node-sass":"^4.13.0","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.0","slash":"^3.0.0","terser-webpack-plugin":"^2.3.1","unionfs":"^4.2.0","urlsafe-base64":"^1.0.0","webpack":"^4.41.3","webpack-dev-server":"^3.9.0","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-node-resolve":"^6.0.0","@types/cheerio":"^0.22.15","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.0.1","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.8.0","@types/node":"^12.12.18","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.16","@types/react-dom":"^16.9.4","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.0","@types/webpack-dev-server":"^3.9.0","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.12.0","react-dom":"^16.12.0","rimraf":"^3.0.0","rollup":"^1.27.13","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-terser":"^5.1.3","typescript":"^3.7.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"d858e6fae870022f2a16a7917b52623ad98d3068","readme":"## Overview\n\n- Static site generator by using React SSR (Server Side Rendering)\n- Developer Experience\n  - Dynamic `Head` component for better SEO\n  - HMR (Hot Module Replacement) when `process.env.NODE_ENV !== 'production'`\n  - Automatically reflect to the browser as soon as you save the scripts and even if styles\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/static react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"static\",\n    \"build\": \"static build\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ]\n}\n```\n\n**`static.config.js`**:\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n  },\n};\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index() {\n  return <p>Hello Static Site</p>;\n}\n```\n\nFinally,\n\n- run `npm run dev` and you'll see `Hello Static Site` in your browser.\n- run `npm run build` and you'll see the static files in the dist directory.\n\nA working examples are here:\n\n- [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n- [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n- [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n\n## Configuration (`static.config.js`)\n\nHere is the default `static.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: 'dist',\n  viewsDir: 'views',\n  port: 3000,\n  routes: {},\n  publicPaths: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `static.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `static.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `static.config.js#distDir`\n\nThe place where `react-ssr` generates static files. (default: `dist`)\n\n```js\nmodule.exports = {\n  distDir: 'out',\n};\n```\n\n### `static.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\n```js\nmodule.exports = {\n  viewsDir: 'pages',\n};\n```\n\n### `static.config.js#port`\n\nThe port of the development server. (default: `3000`)\n\n```js\nmodule.exports = {\n  port: 4000,\n};\n```\n\n### `static.config.js#routes`\n\nThe key is the route, and the value is the path from the views directory.\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n    '/login': 'auth/login',\n  },\n};\n```\n\n### `static.config.js#publicPaths`\n\nThe place where we put static files like images.\n\n```js\nmodule.exports = {\n  publicPaths: [\n    'public',\n  ],\n};\n```\n\n### `static.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = () => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/static';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.19.4-alpha.4","_nodeVersion":"12.14.0","_npmVersion":"lerna/3.19.0/node@v12.14.0+x64 (darwin)","dist":{"integrity":"sha512-sArNuMiAOAOcFZS1qYve1stCSkavb5XZQRwvPitjh61UCX9Yp9Xqk0d4/MATsJJxd+Axb1tvTFMoGO27u+V+5w==","shasum":"09c1032c69b82e020c9595905f6a8590bccfdd33","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.19.4-alpha.4.tgz","fileCount":43,"unpackedSize":330526,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+oj+CRA9TVsSAnZWagAA5AwP/1ZpYefDLX+1viGMp7YP\n9A0nl99nKP6bU4EuNUuUwaHIntiKhtV60/+IvsVzZDXvioNP4i7EgKtDfNSx\nURfhVJTB2KX+ZF4yziK+GeEJ6shyu9F7tbil+Ln/d2zi0UZvtFad74A2VbsU\n5yYH4YiNeBz00Vx5ENiELoqqYC7nFn7dS3zYY6eJTFOMG5cUUU+TEnXLkUol\nDCpEkTKpIFu1s9Jfc0C3syZI7s3vK6c+j7rzePdj+Zn9wjBevo7cwPxhme0e\nU/uTfMNZfnLF7+KbnrTXtgTLzeYxcVO4vH8v/UdMfdvwgIapFJZiTTqHN4jn\n1nE9095jZ8UAQYBG71a9c9g2WaVZQ56MjLakpxggDnOZclHyhTDndFIpaP2P\nbMFF8xQdgp/qzPmB+vC2KAfJq9CJ3DiqWoN2Ae4CeWx1NoxXQprl8AkGOil0\nkAAR4QlXmTAZz+GGONTc3ugWHVD0jle72ZTz/wT5vveSXoBrSdnOZlMVN/m1\nvj5pyOxtLV4HDn0YCiz5Ai6E9r9J7R5dR4/R4zth/knc28u0uGc4Kd0XzLcT\ngUeRE38OipRuXHTr2+x2XsSD8YTzXXrazThLqbeQ1d1jLgoLBX9TjBNK091U\nAB5RFK30tmRGxWWr3wexJ04wqXuogHQwojay4BOUuUIVb5SatxfkLqYNMd8e\n4gjg\r\n=tUBn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH0ko98JO0cUFyluy4DGzJlPTRP2rcFEZRlmkTd7R3/2AiB3S81DCyNI8gPnbetv2EVK+s44XZzE2kXkwCAKyrEVGQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.19.4-alpha.4_1576700158469_0.9389360413398131"},"_hasShrinkwrap":false},"0.19.4-alpha.5":{"name":"@react-ssr/static","version":"0.19.4-alpha.5","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.7.5","@babel/plugin-proposal-class-properties":"^7.7.4","@babel/plugin-proposal-object-rest-spread":"^7.7.4","@babel/plugin-syntax-dynamic-import":"^7.7.4","@babel/plugin-transform-runtime":"^7.7.6","@babel/preset-env":"^7.7.6","@babel/preset-react":"^7.7.4","@babel/preset-typescript":"^7.7.4","@babel/register":"^7.7.4","@babel/runtime":"^7.7.6","@babel/runtime-corejs3":"^7.7.6","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.0","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.0.4","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.8.2","node-sass":"^4.13.0","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.0","slash":"^3.0.0","terser-webpack-plugin":"^2.3.1","unionfs":"^4.2.0","urlsafe-base64":"^1.0.0","webpack":"^4.41.3","webpack-dev-server":"^3.9.0","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-node-resolve":"^6.0.0","@types/cheerio":"^0.22.15","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.0.1","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.8.0","@types/node":"^12.12.18","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.16","@types/react-dom":"^16.9.4","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.0","@types/webpack-dev-server":"^3.9.0","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.12.0","react-dom":"^16.12.0","rimraf":"^3.0.0","rollup":"^1.27.13","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-terser":"^5.1.3","typescript":"^3.7.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"81be20137c35865fc86ce1055e40fd63dcef7b30","readme":"## Overview\n\n- Static site generator by using React SSR (Server Side Rendering)\n- Developer Experience\n  - Dynamic `Head` component for better SEO\n  - HMR (Hot Module Replacement) when `process.env.NODE_ENV !== 'production'`\n  - Automatically reflect to the browser as soon as you save the scripts and even if styles\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/static react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"static\",\n    \"build\": \"static build\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ]\n}\n```\n\n**`static.config.js`**:\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n  },\n};\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index() {\n  return <p>Hello Static Site</p>;\n}\n```\n\nFinally,\n\n- run `npm run dev` and you'll see `Hello Static Site` in your browser.\n- run `npm run build` and you'll see the static files in the dist directory.\n\nA working examples are here:\n\n- [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n- [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n- [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n\n## Configuration (`static.config.js`)\n\nHere is the default `static.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: 'dist',\n  viewsDir: 'views',\n  port: 3000,\n  routes: {},\n  publicPaths: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `static.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `static.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `static.config.js#distDir`\n\nThe place where `react-ssr` generates static files. (default: `dist`)\n\n```js\nmodule.exports = {\n  distDir: 'out',\n};\n```\n\n### `static.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\n```js\nmodule.exports = {\n  viewsDir: 'pages',\n};\n```\n\n### `static.config.js#port`\n\nThe port of the development server. (default: `3000`)\n\n```js\nmodule.exports = {\n  port: 4000,\n};\n```\n\n### `static.config.js#routes`\n\nThe key is the route, and the value is the path from the views directory.\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n    '/login': 'auth/login',\n  },\n};\n```\n\n### `static.config.js#publicPaths`\n\nThe place where we put static files like images.\n\n```js\nmodule.exports = {\n  publicPaths: [\n    'public',\n  ],\n};\n```\n\n### `static.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = () => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/static';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.19.4-alpha.5","_nodeVersion":"12.14.0","_npmVersion":"lerna/3.19.0/node@v12.14.0+x64 (darwin)","dist":{"integrity":"sha512-mdKwSkXWFcjSs44MYFVfgLPGri6AT2/liqIVhCFB25DFaQyg7ZyIOlNxYt80+j422ioWF8NH7Km6P4HjYaoPfg==","shasum":"5c07f003c3c3490680549e253333ca451bf928f9","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.19.4-alpha.5.tgz","fileCount":43,"unpackedSize":330546,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+olZCRA9TVsSAnZWagAAxvwP/2hh9nrg3wzo5KXEiH5a\nZBNEEL8YZ5PMbgU2oqSppBUocqQH9RGrfO2RsGMftVDQFual+LvVpmvMJU+6\nAdWKaEIk8AhNeHBp1IqHArpD3wlw6TEDlUsvtG0IsSBrpm+enO6F92LoRbzS\nQ4rv5YIHlFYTL+tM7ufNydM3/wBxzwSVCwgSUQmi4bdJF+yh1ntyIyBt8Vfy\nJRyOjJWVwpHYPr5TKebXWvz8hpQKG1N+sLieVf61IhxQFTqQqMwUr7HGGJEh\nA0EJBp2odr6Z2bBg1L+1uQgZNIcmklEIUByLvOxZ6NhFV8ZiC6i3yMojZ91O\nZ4r7LcUjjcY3H0YMKuxLvEfNMmh+CLaQI9Jt0wCghe8BV8nTwgPLSJ3fEuhC\nckrSS/Lz8QfcURfkpgppFLZAG1apG2e8zLTZ92k7If+hz2ELKC/OenAR5iPV\nc2sBYnARqxd5tMG64AwXpF+eGn3MI0enL2lDWl83c4/CZeGDwXDz5Qj6Xouz\nXkI55l33EsfDZ2n147a/HPWRrbXK8S9FxFit9JeIjnZE7qf7jDlMC6F8Aouj\nXAm0KycDrqgWz2upvu9noW9EHpqh8Fy6u2+XYnO+b9RW0na5n6Ro8axr2CO/\n4BWAG/0RCjHpCVLqniyUSucMX3UEk0vv+/4I/8fZCqE3+9aMoZmtdlO/lj9j\nKSUi\r\n=0HhZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDZiD+vfWh09gvH3M98vB+yJiZa3gJmgLt33sUttCgB0wIhAPMD+WkPZoPOvrcH7rTMe772DUF+kxV4XZqQQXPLW7T/"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.19.4-alpha.5_1576700249276_0.5004326014988867"},"_hasShrinkwrap":false},"0.19.4-alpha.7":{"name":"@react-ssr/static","version":"0.19.4-alpha.7","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.7.5","@babel/plugin-proposal-class-properties":"^7.7.4","@babel/plugin-proposal-object-rest-spread":"^7.7.4","@babel/plugin-syntax-dynamic-import":"^7.7.4","@babel/plugin-transform-runtime":"^7.7.6","@babel/preset-env":"^7.7.6","@babel/preset-react":"^7.7.4","@babel/preset-typescript":"^7.7.4","@babel/register":"^7.7.4","@babel/runtime":"^7.7.6","@babel/runtime-corejs3":"^7.7.6","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.0","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.0.4","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.8.2","node-sass":"^4.13.0","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.0","slash":"^3.0.0","terser-webpack-plugin":"^2.3.1","unionfs":"^4.2.0","urlsafe-base64":"^1.0.0","webpack":"^4.41.3","webpack-dev-server":"^3.9.0","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-node-resolve":"^6.0.0","@types/cheerio":"^0.22.15","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.0.1","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.8.0","@types/node":"^12.12.18","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.16","@types/react-dom":"^16.9.4","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.0","@types/webpack-dev-server":"^3.9.0","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.12.0","react-dom":"^16.12.0","rimraf":"^3.0.0","rollup":"^1.27.13","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-terser":"^5.1.3","typescript":"^3.7.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"ec4d6d825b0763d5ba42dc383644eccbddb971f7","readme":"## Overview\n\n- Static site generator by using React SSR (Server Side Rendering)\n- Developer Experience\n  - Dynamic `Head` component for better SEO\n  - HMR (Hot Module Replacement) when `process.env.NODE_ENV !== 'production'`\n  - Automatically reflect to the browser as soon as you save the scripts and even if styles\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/static react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"static\",\n    \"build\": \"static build\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ]\n}\n```\n\n**`static.config.js`**:\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n  },\n};\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index() {\n  return <p>Hello Static Site</p>;\n}\n```\n\nFinally,\n\n- run `npm run dev` and you'll see `Hello Static Site` in your browser.\n- run `npm run build` and you'll see the static files in the dist directory.\n\nA working examples are here:\n\n- [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n- [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n- [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n\n## Configuration (`static.config.js`)\n\nHere is the default `static.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: 'dist',\n  viewsDir: 'views',\n  port: 3000,\n  routes: {},\n  publicPaths: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `static.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `static.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `static.config.js#distDir`\n\nThe place where `react-ssr` generates static files. (default: `dist`)\n\n```js\nmodule.exports = {\n  distDir: 'out',\n};\n```\n\n### `static.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\n```js\nmodule.exports = {\n  viewsDir: 'pages',\n};\n```\n\n### `static.config.js#port`\n\nThe port of the development server. (default: `3000`)\n\n```js\nmodule.exports = {\n  port: 4000,\n};\n```\n\n### `static.config.js#routes`\n\nThe key is the route, and the value is the path from the views directory.\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n    '/login': 'auth/login',\n  },\n};\n```\n\n### `static.config.js#publicPaths`\n\nThe place where we put static files like images.\n\n```js\nmodule.exports = {\n  publicPaths: [\n    'public',\n  ],\n};\n```\n\n### `static.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = () => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/static';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.19.4-alpha.7","_nodeVersion":"12.14.0","_npmVersion":"lerna/3.19.0/node@v12.14.0+x64 (darwin)","dist":{"integrity":"sha512-uD03LsCJNuKfXyO4MYVBcx3fpIK0lt8xERPDfDX0VDLNZQ1ELvxZ+EG5CsujihoKshTO76/5VQWue0CWbqSZaw==","shasum":"968eaa703c6c49a78fc6b64585a7ca8048083545","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.19.4-alpha.7.tgz","fileCount":43,"unpackedSize":329990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+ostCRA9TVsSAnZWagAAcdoP/RSXmsUh83qgPEoGy/dt\nHqJ8rNM6x9KWN9B3YMN4EquGyj1VK6jhk/dUCS+O51A+RwK+pZpELu55N9AR\nY+0UxnL/c3okJUukqGJZ0FJdhG43IdU1lgtkpzce4yR7NJW8P31zPgg04E91\n90j8ZTh83cRvgLhedPtBGEbfl6tY1MCw4HIEAiKI3kE7Mr229SV0LvLPLcYJ\nFskRftteKiZbkRyVYEzn7m9duJF3ry+n1b+OrWmm/JBnLC2xB15QcOKGUoMq\nogUPsNJMdC3VDrxST+n35qY6HWfLgZfLd7T7szW53rINi+apMScPs+6wJwBb\nqufsbk1ElGqD3FLdN2a5Y3Kr2Rdtz2qgO/q1osPDWSljizwoeq5mmzms+EY+\n/HRennnS3GhRmmzaw8p+jFrcGpzEdU+EzZfZBs9bCCoWHHec9hs8JPa2nCI4\nyRA7HDNTWVcO224skOsIbIYyU92qqE8UIs4C5vfrmmah+xcAW6ze74VexWSz\nqDwv65a495LtdGYZsjj+RmNISnOlYpDZQJ/bv1yhlIeUTQ+cCMcETTD0sWVh\n+J1XCB1J69LgZDl3OZSgbk9DYJqKDyFLzVf6lK9qYYh2cF1WNjYCYIXYYo5N\n4WHeZYvRSvo29h3TXjkVGPwbPBdnuJ4nFQ3Ad0U43GoocpWyCqnRxaysSJtR\npvL4\r\n=f/2S\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICU9ydnsvvHE4N1wwwbyYJauHqKMBdf3IA5/csAMUofUAiEA0Pshkyy8cYNPlt0L2xYlNWUjrFlVTgXVgmVJnoDEvaM="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.19.4-alpha.7_1576700717086_0.29006480749818064"},"_hasShrinkwrap":false},"0.19.4-alpha.8":{"name":"@react-ssr/static","version":"0.19.4-alpha.8","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.7.5","@babel/plugin-proposal-class-properties":"^7.7.4","@babel/plugin-proposal-object-rest-spread":"^7.7.4","@babel/plugin-syntax-dynamic-import":"^7.7.4","@babel/plugin-transform-runtime":"^7.7.6","@babel/preset-env":"^7.7.6","@babel/preset-react":"^7.7.4","@babel/preset-typescript":"^7.7.4","@babel/register":"^7.7.4","@babel/runtime":"^7.7.6","@babel/runtime-corejs3":"^7.7.6","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.0","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.0.4","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.8.2","node-sass":"^4.13.0","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.0","slash":"^3.0.0","terser-webpack-plugin":"^2.3.1","unionfs":"^4.2.0","urlsafe-base64":"^1.0.0","webpack":"^4.41.3","webpack-dev-server":"^3.9.0","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-node-resolve":"^6.0.0","@types/cheerio":"^0.22.15","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.0.1","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.8.0","@types/node":"^12.12.18","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.16","@types/react-dom":"^16.9.4","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.0","@types/webpack-dev-server":"^3.9.0","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.12.0","react-dom":"^16.12.0","rimraf":"^3.0.0","rollup":"^1.27.13","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-terser":"^5.1.3","typescript":"^3.7.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"95e7a918a2a2fb16a8a1781b0c534a3ea68582a1","readme":"## Overview\n\n- Static site generator by using React SSR (Server Side Rendering)\n- Developer Experience\n  - Dynamic `Head` component for better SEO\n  - HMR (Hot Module Replacement) when `process.env.NODE_ENV !== 'production'`\n  - Automatically reflect to the browser as soon as you save the scripts and even if styles\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/static react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"static\",\n    \"build\": \"static build\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ]\n}\n```\n\n**`static.config.js`**:\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n  },\n};\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index() {\n  return <p>Hello Static Site</p>;\n}\n```\n\nFinally,\n\n- run `npm run dev` and you'll see `Hello Static Site` in your browser.\n- run `npm run build` and you'll see the static files in the dist directory.\n\nA working examples are here:\n\n- [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n- [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n- [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n\n## Configuration (`static.config.js`)\n\nHere is the default `static.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: 'dist',\n  viewsDir: 'views',\n  port: 3000,\n  routes: {},\n  publicPaths: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `static.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `static.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `static.config.js#distDir`\n\nThe place where `react-ssr` generates static files. (default: `dist`)\n\n```js\nmodule.exports = {\n  distDir: 'out',\n};\n```\n\n### `static.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\n```js\nmodule.exports = {\n  viewsDir: 'pages',\n};\n```\n\n### `static.config.js#port`\n\nThe port of the development server. (default: `3000`)\n\n```js\nmodule.exports = {\n  port: 4000,\n};\n```\n\n### `static.config.js#routes`\n\nThe key is the route, and the value is the path from the views directory.\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n    '/login': 'auth/login',\n  },\n};\n```\n\n### `static.config.js#publicPaths`\n\nThe place where we put static files like images.\n\n```js\nmodule.exports = {\n  publicPaths: [\n    'public',\n  ],\n};\n```\n\n### `static.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = () => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/static';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.19.4-alpha.8","_nodeVersion":"12.14.0","_npmVersion":"lerna/3.19.0/node@v12.14.0+x64 (darwin)","dist":{"integrity":"sha512-3xLyOToxfr44rpsF3lyGLbLgZKA2ZW7g81MjpJ/hDHd64zz6uhR7PArOABPl023vHXrXy3lRVXzeYO8LoyaCdA==","shasum":"6ed1744b41ef96d7d466e53055024b2845cdbebc","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.19.4-alpha.8.tgz","fileCount":43,"unpackedSize":330069,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+owcCRA9TVsSAnZWagAAGUUP/3aUFLVsYp3z32PRg7mK\n3GG77wr8J1egPyzU+JRZSi65gLOCCPcqZ0qoPSHgVCCw2OdWZz5sxvjIW5yn\nZnoiYtz64r09lFFbbUoD0V+asg2kYXHgBU7j7JyMhNHPK8UE4hZ+ohB1YjJt\nfIz2k495FmrWbUgceHGHR0vW8FYB6DWQxJ3amj5p9iFxyRNwhuYVmmhVccrc\nMZsVWgLoUO81HWzAg58aotx94/p6vxkuT7wr7s7FEGJC5ad51Zgw9lwayXp0\ns7wl8KHZJogUyAoqRO2UKYhYRUT3NBwzmMa+y3yIsdByr1z5srAD5ZxjvnEH\nQXa0ig7fX6uh+9sGX4jeKOoJlO35XersCYP9FChWaTwFw3U00Mi6N6Tlg6IB\n+PzA9cYgVkleUVpqVNXiBJkWoDhd9HYU6Szl+vdp4g7+a6JmvO/6Cc9W5wBB\nrXqQsIq83MSvpV0E2FBcw5uQkmUkCPTwTct31DHwJ+tri7kbEEPUUAEd6Ebv\nwwz+DhlzSMRX8k9m6c3y2g53RrWkMRc9UnVdOhNEREDYViVixrgkirq95JQ3\n/OEYXck+iDtDZTWuYw0uZiYq6qseWDXLDUP6Ty2fAyFkRjefaQsdCl9dnKrT\ne7vxyn6F+XI+aE48WkQeWM8Pl+/lDb82akmn8pQfI0MQ7SLyPw3OywfBZjey\nsNvU\r\n=m7XC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGINXBpccqaUmCbety/8iQfMo9xPACOVEF/lCl8GiKgxAiAD2LrZPm3IT7sP3l3vcV6QP0lxye+EnfqBxKiosuBwRQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.19.4-alpha.8_1576700955920_0.5177129791250117"},"_hasShrinkwrap":false},"0.19.4-alpha.9":{"name":"@react-ssr/static","version":"0.19.4-alpha.9","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.7.5","@babel/plugin-proposal-class-properties":"^7.7.4","@babel/plugin-proposal-object-rest-spread":"^7.7.4","@babel/plugin-syntax-dynamic-import":"^7.7.4","@babel/plugin-transform-runtime":"^7.7.6","@babel/preset-env":"^7.7.6","@babel/preset-react":"^7.7.4","@babel/preset-typescript":"^7.7.4","@babel/register":"^7.7.4","@babel/runtime":"^7.7.6","@babel/runtime-corejs3":"^7.7.6","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.0","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.0.4","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.8.2","node-sass":"^4.13.0","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.0","slash":"^3.0.0","terser-webpack-plugin":"^2.3.1","unionfs":"^4.2.0","urlsafe-base64":"^1.0.0","webpack":"^4.41.3","webpack-dev-server":"^3.9.0","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-node-resolve":"^6.0.0","@types/cheerio":"^0.22.15","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.0.1","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.8.0","@types/node":"^12.12.18","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.16","@types/react-dom":"^16.9.4","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.0","@types/webpack-dev-server":"^3.9.0","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.12.0","react-dom":"^16.12.0","rimraf":"^3.0.0","rollup":"^1.27.13","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-terser":"^5.1.3","typescript":"^3.7.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"4a8fd7a071257c490304059d494693b5915fa013","readme":"## Overview\n\n- Static site generator by using React SSR (Server Side Rendering)\n- Developer Experience\n  - Dynamic `Head` component for better SEO\n  - HMR (Hot Module Replacement) when `process.env.NODE_ENV !== 'production'`\n  - Automatically reflect to the browser as soon as you save the scripts and even if styles\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/static react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"static\",\n    \"build\": \"static build\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ]\n}\n```\n\n**`static.config.js`**:\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n  },\n};\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index() {\n  return <p>Hello Static Site</p>;\n}\n```\n\nFinally,\n\n- run `npm run dev` and you'll see `Hello Static Site` in your browser.\n- run `npm run build` and you'll see the static files in the dist directory.\n\nA working examples are here:\n\n- [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n- [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n- [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n\n## Configuration (`static.config.js`)\n\nHere is the default `static.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: 'dist',\n  viewsDir: 'views',\n  port: 3000,\n  routes: {},\n  publicPaths: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `static.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `static.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `static.config.js#distDir`\n\nThe place where `react-ssr` generates static files. (default: `dist`)\n\n```js\nmodule.exports = {\n  distDir: 'out',\n};\n```\n\n### `static.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\n```js\nmodule.exports = {\n  viewsDir: 'pages',\n};\n```\n\n### `static.config.js#port`\n\nThe port of the development server. (default: `3000`)\n\n```js\nmodule.exports = {\n  port: 4000,\n};\n```\n\n### `static.config.js#routes`\n\nThe key is the route, and the value is the path from the views directory.\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n    '/login': 'auth/login',\n  },\n};\n```\n\n### `static.config.js#publicPaths`\n\nThe place where we put static files like images.\n\n```js\nmodule.exports = {\n  publicPaths: [\n    'public',\n  ],\n};\n```\n\n### `static.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = () => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/static';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.19.4-alpha.9","_nodeVersion":"12.14.0","_npmVersion":"lerna/3.19.0/node@v12.14.0+x64 (darwin)","dist":{"integrity":"sha512-D1OXe2J6OWttfKAfZmGAZQM0xrPiTHRUyzmsURCqIn/7cdLMeQSLi6kni7yYacY+GfQwttxvnPRHNjKLZP/U8Q==","shasum":"4bacc7e001be326a79d1ecc989f62262dc01c86e","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.19.4-alpha.9.tgz","fileCount":43,"unpackedSize":330069,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+oyUCRA9TVsSAnZWagAAe6wP/Ro8VUbfmh6L85VQAunX\nYy1HkWEk+P4xImKKtlG29bspvX0hV/DUnLoxfQxzRC7mp7wRPMisAZTNhK7d\nvAc7J7NVrhopYcljTEPbPoR1+uOTEXtF3avzSYefiQZigELV35ImrbHDMRsW\nXjSCao8l2zFkC6r32xoiFfXyvpC3qqcT/Fox1vV2wSM9pGwBgiE6c4RGIDnf\nx86o0zvm3e0wxW9uEBBWJFmklG16uR6rxnItaxkWnwaJo7q8ixXVBI1t+Myo\ng4y9Vdaj9WZrBw4k3y/FvczgGXMgPZzs/4GaWuBEc+LZ60CvLcfucE+clEbj\n1Ny5CJDdzn6E0NVQ98Clq1V3TGb4KhMiOC9+c6gEp8PKZfa2rUYD/gdr1A3Y\nHLjQNO9HgRpoLBGysZUW8wli6Ijaz9F46knFTRC3jMm+i4EffjOX107i4LKf\nqWLAzfri2t03tKMXsln68EXkyjhqgMZ8NZBPRLNEHovO1CqH61LIBmueKqZG\nNr3Nqg22yNsr+pX53RiBXjujb8txbeKlTgQ2jZLH8KxTbZTmOSjfsA6+MlLy\n5t0INOLMm5xNnx//RAcE4VxnU/SqNBHYyYt+Pv6rPudbYUVoFVqK/nWP2932\nhkJuE+VxBbTixjQbVu8Dnxi3i2quoCcSYIsFvxTr7O+ud2uDCyr8LXYcoPFu\nQWjy\r\n=O8f3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEfEOZ7ePNSFizNi9MfpevS9mh25bgk8c7u8RlxXS6OLAiEAg4aTkeI/LtHJYGgdWSHF18oPf1OgXR0XqDaEFZr03Wc="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.19.4-alpha.9_1576701075995_0.9827881603918254"},"_hasShrinkwrap":false},"0.19.4-alpha.10":{"name":"@react-ssr/static","version":"0.19.4-alpha.10","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.7.5","@babel/plugin-proposal-class-properties":"^7.7.4","@babel/plugin-proposal-object-rest-spread":"^7.7.4","@babel/plugin-syntax-dynamic-import":"^7.7.4","@babel/plugin-transform-runtime":"^7.7.6","@babel/preset-env":"^7.7.6","@babel/preset-react":"^7.7.4","@babel/preset-typescript":"^7.7.4","@babel/register":"^7.7.4","@babel/runtime":"^7.7.6","@babel/runtime-corejs3":"^7.7.6","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.0","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.0.4","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.8.2","node-sass":"^4.13.0","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.0","slash":"^3.0.0","terser-webpack-plugin":"^2.3.1","unionfs":"^4.2.0","urlsafe-base64":"^1.0.0","webpack":"^4.41.3","webpack-dev-server":"^3.9.0","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-node-resolve":"^6.0.0","@types/cheerio":"^0.22.15","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.0.1","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.8.0","@types/node":"^12.12.18","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.16","@types/react-dom":"^16.9.4","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.0","@types/webpack-dev-server":"^3.9.0","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.12.0","react-dom":"^16.12.0","rimraf":"^3.0.0","rollup":"^1.27.13","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-terser":"^5.1.3","typescript":"^3.7.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"b9a706d05201a36d5d61cb6c98a9bb1ab2e504ac","readme":"## Overview\n\n- Static site generator by using React SSR (Server Side Rendering)\n- Developer Experience\n  - Dynamic `Head` component for better SEO\n  - HMR (Hot Module Replacement) when `process.env.NODE_ENV !== 'production'`\n  - Automatically reflect to the browser as soon as you save the scripts and even if styles\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/static react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"static\",\n    \"build\": \"static build\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ]\n}\n```\n\n**`static.config.js`**:\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n  },\n};\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index() {\n  return <p>Hello Static Site</p>;\n}\n```\n\nFinally,\n\n- run `npm run dev` and you'll see `Hello Static Site` in your browser.\n- run `npm run build` and you'll see the static files in the dist directory.\n\nA working examples are here:\n\n- [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n- [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n- [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n\n## Configuration (`static.config.js`)\n\nHere is the default `static.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: 'dist',\n  viewsDir: 'views',\n  port: 3000,\n  routes: {},\n  publicPaths: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `static.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `static.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `static.config.js#distDir`\n\nThe place where `react-ssr` generates static files. (default: `dist`)\n\n```js\nmodule.exports = {\n  distDir: 'out',\n};\n```\n\n### `static.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\n```js\nmodule.exports = {\n  viewsDir: 'pages',\n};\n```\n\n### `static.config.js#port`\n\nThe port of the development server. (default: `3000`)\n\n```js\nmodule.exports = {\n  port: 4000,\n};\n```\n\n### `static.config.js#routes`\n\nThe key is the route, and the value is the path from the views directory.\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n    '/login': 'auth/login',\n  },\n};\n```\n\n### `static.config.js#publicPaths`\n\nThe place where we put static files like images.\n\n```js\nmodule.exports = {\n  publicPaths: [\n    'public',\n  ],\n};\n```\n\n### `static.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = () => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/static';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.19.4-alpha.10","_nodeVersion":"12.14.0","_npmVersion":"lerna/3.19.0/node@v12.14.0+x64 (darwin)","dist":{"integrity":"sha512-Nq2lnqry7HKEvkVD68j+F28mLKBvIfUUvV0hC3Cdw2hT77ZtXhaEtjD8yE03HNqy6S1S3m+O+vFwpFYyXPCuKw==","shasum":"c4f0fda09819b08c5b5f700d20676d43f1bba25c","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.19.4-alpha.10.tgz","fileCount":43,"unpackedSize":330070,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+ozwCRA9TVsSAnZWagAAqrcQAJr6dkj5X061whROvPrk\n2S1uQK/v0JJzvZuDJvPhq1COg7ZmrJlQhjOKovxOjlaErw5DkVw237Ge+Rsk\nt+LvFy1bZk/9UPzjmzV1qppyiuwjGJv1wOxHf6gNM1MdqSUKv8cneg0a1FYj\nPCoLoP0/U5won26k8eTNiRT/PWtCQXnrWacQUasW738DnEqG+4y8srp8abqr\nBBQQ4k8MPlc7rIMyK3iK2D534Eyu4hEl60CJ6fgW+TmFzgLp+74UEC4cVgN/\nUyO5WMy7KXIyIeAVJ48uOmk02Tr9S3lMuj12LCZRcxleUdpvJhC9TILLdMFZ\nq1Q1xLzA7Q3wXGMFYjhlETQ1U6ss4avhwwZIe6R5NDIMxMGc4ndjx0Bejgyi\nQJB7nrBo8S8gx8LYEx/fjSWHKTegrdIOAaGSyUNZYm05oW28E8RxtEyE0mCY\nnVgPESWgxSWfEQmr79feMMGqDNjlED+j2l7wPZKE014Gf6eZa2sYlJa74aDO\nt4NS+nHQtwj91IoVI6fiJEbuf73GXM63ybniyK+RTcKKe8h6/d0Bm5NE8IGz\nqSwQ8ZdWoORYU4bznKKadNEgX4xqirI4jhK9/l/74h3sHdrpDtG89rzw5+Qr\nMI2IgXAaXD97k/VBZPi129VlPvMc0/vBldZKerQFJkM5usEyD4qNghDUW2ic\nKRSS\r\n=TWCd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDhS4qWutoeaauGQM3f7UyUeHLjot5Zga+GaLkB+0oOcAIgAzMZMRVtOGaHMXetMWSBdGoP7Q7pJdW9bBQGjaxpfRQ="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.19.4-alpha.10_1576701168067_0.024877965210534425"},"_hasShrinkwrap":false},"0.19.4":{"name":"@react-ssr/static","version":"0.19.4","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.7.5","@babel/plugin-proposal-class-properties":"^7.7.4","@babel/plugin-proposal-object-rest-spread":"^7.7.4","@babel/plugin-syntax-dynamic-import":"^7.7.4","@babel/plugin-transform-runtime":"^7.7.6","@babel/preset-env":"^7.7.6","@babel/preset-react":"^7.7.4","@babel/preset-typescript":"^7.7.4","@babel/register":"^7.7.4","@babel/runtime":"^7.7.6","@babel/runtime-corejs3":"^7.7.6","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.0","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.0.4","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.8.2","node-sass":"^4.13.0","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.0","slash":"^3.0.0","terser-webpack-plugin":"^2.3.1","unionfs":"^4.2.0","urlsafe-base64":"^1.0.0","webpack":"^4.41.3","webpack-dev-server":"^3.10.0","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-node-resolve":"^6.0.0","@types/cheerio":"^0.22.15","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.0.1","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.8.0","@types/node":"^12.12.18","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.16","@types/react-dom":"^16.9.4","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.0","@types/webpack-dev-server":"^3.9.0","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.12.0","react-dom":"^16.12.0","rimraf":"^3.0.0","rollup":"^1.27.13","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-terser":"^5.1.3","typescript":"^3.7.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"c5e1f07dde017b362c04a8e199cf3bd53424334b","_id":"@react-ssr/static@0.19.4","_nodeVersion":"12.14.0","_npmVersion":"lerna/3.19.0/node@v12.14.0+x64 (darwin)","dist":{"integrity":"sha512-0Tfj16U7XLJSvwRZLya8SesP8ZPeya+s3ORJuogLdskNmCRxfbyyR4EGrbys2Jzv/vCSC39CAzRKjwJ86bYmQQ==","shasum":"32d19139267d152529813eade7b56f635930ccb3","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.19.4.tgz","fileCount":43,"unpackedSize":330048,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+o4aCRA9TVsSAnZWagAAU50P/3H/zWHNasnV6M85QQ13\n76krvY+YV6yD5DkpqCJ7ClIgOk/PgbpBfOKu7fR6iGgnWwvU48gIjJ46vh+i\nWOadcoj5ZZc83LYE3mR3Q9UJPKHHAe7rxm+yjY2fWYgkG3ZOriYSD5oaialH\nmWH7fiaZJtlVSiyuDEcUSXES4MYyv8KOI0cUv3QdomECnpjqCxyVrztO6L3r\nRTj7O/MA7OAFqv/mfrYZCRAWjGWIvYjgmmbmYa4ZMrM/J4W9Mm21GLjK6JxM\n+WQH4vm5OQSlcz4TCoDKw1w98KtLjtvGWecJqeVvDNq5IQJ579nD+VFvgolK\nWbdkuoDs7NC0msZL33eRsItY2XtVqHTi+hlZqJNd8RKTo+jambYeScbjSXqU\nQYyAhyin9Qyi8pxM3mWtkz+TYjTPcoUaDS4hJvGSwN+666jPG94E8arBW3ND\nQdmn9+m1Mp+ToSq77NdRp/V2q+dqZeMfrf/25mNCT4AZyCnn+9KiEJ0NpTNW\nCR0FffVCSbU/sQBVUGItBmjEXngXk25mmefXADxUUFL2ykqt9IcN96Edais3\nTdgTnGHtz9f7ZyLC6BJlgsF2sf/++K3IuY4AvpAM3dqMjVY34U3Z9wwGi/MZ\nH5mNfofBYQ0ayDIzq/7tXC9piz20m/vq9lv3Rg6a6nGKVN8TUlcJ+rUWvJk+\nScdV\r\n=0xJQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDB6WtK/RWhXBVLg4wK2ZB6Dj0ILZMOOzyHAxguED4DvAiAX2bn0iI4nqo6iY5Dixz6bhZbjcd5N5Egzm4MIW6PWZg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.19.4_1576701466091_0.04466142140414009"},"_hasShrinkwrap":false,"deprecated":"Deprecated: please use NEXT.js (https://github.com/zeit/next.js) or express-react-views (https://github.com/reactjs/express-react-views)"},"0.19.5":{"name":"@react-ssr/static","version":"0.19.5","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.7.5","@babel/plugin-proposal-class-properties":"^7.7.4","@babel/plugin-proposal-object-rest-spread":"^7.7.4","@babel/plugin-syntax-dynamic-import":"^7.7.4","@babel/plugin-transform-runtime":"^7.7.6","@babel/preset-env":"^7.7.6","@babel/preset-react":"^7.7.4","@babel/preset-typescript":"^7.7.4","@babel/register":"^7.7.4","@babel/runtime":"^7.7.6","@babel/runtime-corejs3":"^7.7.6","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.0","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.0.4","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.8.2","node-sass":"^4.13.0","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.0","slash":"^3.0.0","terser-webpack-plugin":"^2.3.1","unionfs":"^4.2.0","urlsafe-base64":"^1.0.0","webpack":"^4.41.3","webpack-dev-server":"^3.10.0","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-node-resolve":"^6.0.0","@types/cheerio":"^0.22.15","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.0.1","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.8.0","@types/node":"^12.12.18","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.16","@types/react-dom":"^16.9.4","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.0","@types/webpack-dev-server":"^3.9.0","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.12.0","react-dom":"^16.12.0","rimraf":"^3.0.0","rollup":"^1.27.13","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-terser":"^5.1.3","typescript":"^3.7.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"e296d90aabc86531df8cba37a02de4ead71fb585","_id":"@react-ssr/static@0.19.5","_nodeVersion":"12.14.0","_npmVersion":"lerna/3.19.0/node@v12.14.0+x64 (darwin)","dist":{"integrity":"sha512-j5ouJJO431fXQuig1euh3K6Hk2bZbqhPyPIF1/R+okIYVGsQuQLjMaTfRwvogcyhaSRBgdjBbcbA072OjWSmdQ==","shasum":"50c4eaeae8ba2ed4e80e4d2416b4cc88f41a4209","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.19.5.tgz","fileCount":43,"unpackedSize":329951,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+o/BCRA9TVsSAnZWagAAdB0QAIB1BYxINSLpaLtp3MHT\niJo5kyzjgKxpw4osQQtq3ke5+1vMF0MVtJB6ezeoeQjjCRoX3lnhi2NYNntw\nuVnr25PS8hA7Mu4TmRq4Z5H0SiyjeUbwTp1ddyjDv1fG7gKD5uJpgom49uhJ\nyfFGNO0s4yi8Wg2UlCa3QIGYm7H5WD92gIqlqR3ccS/vHbypjMfHj4cx11uF\n16uxi7j1sV5MktIMODN+DGwIL1rgTVNVgkIDplWxglGrVOymGbBuIlHifYhb\ncSlIvD0xVO8N52Zco6JM3lzf8cZXPqxjqLuaL9iq74TrxJzXgIoR7SsEVesv\noms2sV2dX0M1tkwZnXsNGtuPROnwzANKqOTej7ysU1OnHgPEAT1BEUo/m77Q\nJrYs0Hb+cvf2fRlWxHpV3oCXOk1l5q051I8S0JbqZIuT0oMU2P9Q+NgEQr8y\n5PluBa/vQB1qJvTo0+9+l13H8ow6NGCz3v7iFhCmzOqoCgYCsJOesCRZdoQr\nYYT3fwxJwVZMuhX3G8oVocxLNRWek8tD31yBwJv7HHynRTSrVAdZB0O8uFNO\nYT0ncPOvD/3SqStMZ6DpZzuzZTeHcPQGSPbVYdyZNgR3Rr9c9vJCKEx9ctKF\n/qaK2YPAXNpkz/wzVsE9WCrbkTI7T3LNNd61HU/i0MWEcL38fgZAyaHnZ8/D\nBTNV\r\n=MYcC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDvKk9RJnu2vHgNZ1fhQApPDJVSM4DFzRfpybd1adAvIgIhAIINWXtNchIIZAxyBbWPMeYQTNehmQ/XzPOVdmw1D1h/"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.19.5_1576701889038_0.41095828266989165"},"_hasShrinkwrap":false,"deprecated":"Deprecated: please use NEXT.js (https://github.com/zeit/next.js) or express-react-views (https://github.com/reactjs/express-react-views)"},"0.19.6":{"name":"@react-ssr/static","version":"0.19.6","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.7.7","@babel/plugin-proposal-class-properties":"^7.7.4","@babel/plugin-proposal-object-rest-spread":"^7.7.7","@babel/plugin-syntax-dynamic-import":"^7.7.4","@babel/plugin-transform-runtime":"^7.7.6","@babel/preset-env":"^7.7.7","@babel/preset-react":"^7.7.4","@babel/preset-typescript":"^7.7.7","@babel/register":"^7.7.7","@babel/runtime":"^7.7.7","@babel/runtime-corejs3":"^7.7.7","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.0","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.0.4","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.8.2","node-sass":"^4.13.0","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.0","slash":"^3.0.0","terser-webpack-plugin":"^2.3.1","unionfs":"^4.2.0","urlsafe-base64":"^1.0.0","webpack":"^4.41.4","webpack-dev-server":"^3.10.1","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-node-resolve":"^6.0.0","@types/cheerio":"^0.22.15","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.0.1","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.8.0","@types/node":"^12.12.18","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.16","@types/react-dom":"^16.9.4","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.0","@types/webpack-dev-server":"^3.9.0","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.12.0","react-dom":"^16.12.0","rimraf":"^3.0.0","rollup":"^1.27.13","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-terser":"^5.1.3","typescript":"^3.7.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"9c375b4e1c631620368426dce0a16e8626b3a272","_id":"@react-ssr/static@0.19.6","_nodeVersion":"12.14.0","_npmVersion":"lerna/3.19.0/node@v12.14.0+x64 (darwin)","dist":{"integrity":"sha512-6zIC+qPcB8qrkw/2/JZQBd23GSfVW/wmRNYja45E1DGJOWLFRPjDl7/xAHvp909n4f+8BrUXouOLGWmIxjB9uA==","shasum":"28fa1425a69cc38038935056d6502a011f5aa1b0","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.19.6.tgz","fileCount":43,"unpackedSize":338793,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd/NI4CRA9TVsSAnZWagAA4o4P/2rHli6RAsk6SoqY3wXy\nrC59mWkt8Zmra2n3+4oUabbbmT+UunqhApqpJTfBhz8Vd6VwhpGsB6+/gdwm\n5SmrYWZSwaLvSinVth5IY0ggd8HJeePiLfolqoXdhpqnmtAGM77PUI6ZFjLk\nhVChAouOVz5fd8U7XhhoOc9aAMQo6m8w1ffR1JhU71/CfU/dW63XVb7BGr4N\n/PZ7LNcW72Wf5a1vcp/eOevw27QQ0LwHmjSKODSlBjbJyIwMlDyZkfilvgtq\n0cezkpru09T0ugdeC+8sPXWdePhIQVgdusXvFNig0hUtwmkX6O82kEW8+Vnd\nfBvfE2l8LBb28/GoFTNJDIAKMw6rKs2/7i+dEQvfr26WrGAte1TqbCrA/hWM\nlrsVXYrNEi5SWgd/n3fhenlbw5W9sCoGhy9GK6pa7jdlD3TYHDznpdmBh3Nw\nGoMuvmPP+eA7p3A99K8Ui9U/H6fLghD7etz3qNtFxriJExM22L+/hqs21I8A\n0hmbHRbrZ4Of+z3E0YFD93nhvFWnK1PGYUhCb12N7Ke2gUARqKOSHI2uwNRB\nfgdFMMTu65B8fuuz9X7aUN1PqXWhVVm18LrlK0cxCwj7QMrSmR9T/HxJpvHw\n0Zmc0PhAeLXd6wj/xmpyDGfoGBkTWVT6d2a3FhMjSkl5XbTSzZwKZYLQMEvH\nzWHT\r\n=KjKq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC1JXDed3H3teHcWdRVPWr9dqnsXhwsngOEcm5NiXFUrAiAc8QaW99x3w/rX3ZJJX25VubyBzbLRZbdlQ8H8vZTkwQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.19.6_1576849975610_0.34065065671609895"},"_hasShrinkwrap":false,"deprecated":"Deprecated: please use NEXT.js (https://github.com/zeit/next.js) or express-react-views (https://github.com/reactjs/express-react-views)"},"0.19.7-alpha.0":{"name":"@react-ssr/static","version":"0.19.7-alpha.0","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.7.7","@babel/plugin-proposal-class-properties":"^7.7.4","@babel/plugin-proposal-object-rest-spread":"^7.7.7","@babel/plugin-syntax-dynamic-import":"^7.7.4","@babel/plugin-transform-runtime":"^7.7.6","@babel/preset-env":"^7.7.7","@babel/preset-react":"^7.7.4","@babel/preset-typescript":"^7.7.7","@babel/register":"^7.7.7","@babel/runtime":"^7.7.7","@babel/runtime-corejs3":"^7.7.7","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.0","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.0.4","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.8.2","node-sass":"^4.13.0","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.0","slash":"^3.0.0","terser-webpack-plugin":"^2.3.1","unionfs":"^4.2.0","urlsafe-base64":"^1.0.0","webpack":"^4.41.4","webpack-dev-server":"^3.10.1","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-node-resolve":"^6.0.0","@types/cheerio":"^0.22.15","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.0.1","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.8.0","@types/node":"^12.12.18","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.16","@types/react-dom":"^16.9.4","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.0","@types/webpack-dev-server":"^3.9.0","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.12.0","react-dom":"^16.12.0","rimraf":"^3.0.0","rollup":"^1.27.13","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-terser":"^5.1.3","typescript":"^3.7.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"176ba623f7267a6ea4643dc91d1b4b16500bd1e0","readme":"## Overview\n\n- Static site generator by using React SSR (Server Side Rendering)\n- Developer Experience\n  - Dynamic `Head` component for better SEO\n  - HMR (Hot Module Replacement) when `process.env.NODE_ENV !== 'production'`\n  - Automatically reflect to the browser as soon as you save the scripts and even if styles\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/static react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"static\",\n    \"build\": \"static build\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ]\n}\n```\n\n**`static.config.js`**:\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n  },\n};\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index() {\n  return <p>Hello Static Site</p>;\n}\n```\n\nFinally,\n\n- run `npm run dev` and you'll see `Hello Static Site` in your browser.\n- run `npm run build` and you'll see the static files in the dist directory.\n\nA working examples are here:\n\n- [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n- [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n- [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n\n## Configuration (`static.config.js`)\n\nHere is the default `static.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: 'dist',\n  viewsDir: 'views',\n  port: 3000,\n  routes: {},\n  publicPaths: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `static.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `static.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `static.config.js#distDir`\n\nThe place where `react-ssr` generates static files. (default: `dist`)\n\n```js\nmodule.exports = {\n  distDir: 'out',\n};\n```\n\n### `static.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\n```js\nmodule.exports = {\n  viewsDir: 'pages',\n};\n```\n\n### `static.config.js#port`\n\nThe port of the development server. (default: `3000`)\n\n```js\nmodule.exports = {\n  port: 4000,\n};\n```\n\n### `static.config.js#routes`\n\nThe key is the route, and the value is the path from the views directory.\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n    '/login': 'auth/login',\n  },\n};\n```\n\n### `static.config.js#publicPaths`\n\nThe place where we put static files like images.\n\n```js\nmodule.exports = {\n  publicPaths: [\n    'public',\n  ],\n};\n```\n\n### `static.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = () => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/static';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.19.7-alpha.0","_nodeVersion":"12.14.0","_npmVersion":"lerna/3.19.0/node@v12.14.0+x64 (darwin)","dist":{"integrity":"sha512-5ke/ACkOh3LpBlAPJtdhDOGKIhPnbiUab+xJoOynVRAHf+dqXYDOkOVtrAl7MPliD8tQa64wmxePv1pkXP55zQ==","shasum":"5b40aa5724aee05b53ab8495204cd3efead49c1f","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.19.7-alpha.0.tgz","fileCount":43,"unpackedSize":338853,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd/NZCCRA9TVsSAnZWagAA8NAP/2tzreCeUIOrMZGf6VsU\niu6rqzOlbd9xX08DZAsJ1WN8FKe7jLOn0mKrdAFs3D72wX/4OObMYuCHrPBT\n6rmcaBCafC3BJVXBJgRszrP8v6brWWofKIBaxZ6jISIWQZpIadf3B0gdQoSV\nuKC2p8L6nMpp6PzLw1dlM96T1Co811MzANTjPzWZBqM5ZQMagt6nf5x/M5tT\nv2acFTcon9i3wTUhmJ74qhAJ3Va9gLp6GAS28DNdBTiqMRJbiktlWEe15BBD\nKhv8mhGfU80KwQbQy1PrDC5RYY1AwxNPmDeee2CBHL/DBAFogDvey5HpZlt3\niIyf+4i/dkMS5kYKRYjYrZtRboezqs4dEAzU2xzml/vJ+uvEKoL4Css9xkes\nsEP4uXE0pM4zDQuHW783cISL+brw433yefM0Gg9g86LOvItf3LESoS59D3gH\nZryt5URxBN8PQT3GUpHjj49tTvMAMMFKpiuMb2qp7kFlKxsDZch55qPk8MpZ\np6+7TdHK+hOkkzIcSiCaQe0cnwP6P+7M0SEPo/X9/bKDlgtsGHNyKgoW31kw\n4tvK564Ghj0vYtXTu1GrG8znhfKbjHvtjUokiNtwTC1OdEdw5gATPl/bhRO2\nn4i27dxQXb3GqH5clOpSdF61kSoQ8zpOb/GuezHbxcP+1ZsbPckYCGOqUIMm\nlL7z\r\n=rjFr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCrV7ymVpKkrHEcxImC3n8wEwTzH7UD74Yzowvlm05L1wIgZHLzWULcD2Orqj1RftRcnmd/+evQx4Kqz9mZV8tPXJs="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.19.7-alpha.0_1576851010182_0.38801295443422656"},"_hasShrinkwrap":false},"0.19.7-alpha.3":{"name":"@react-ssr/static","version":"0.19.7-alpha.3","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.7.7","@babel/plugin-proposal-class-properties":"^7.7.4","@babel/plugin-proposal-object-rest-spread":"^7.7.7","@babel/plugin-syntax-dynamic-import":"^7.7.4","@babel/plugin-transform-runtime":"^7.7.6","@babel/preset-env":"^7.7.7","@babel/preset-react":"^7.7.4","@babel/preset-typescript":"^7.7.7","@babel/register":"^7.7.7","@babel/runtime":"^7.7.7","@babel/runtime-corejs3":"^7.7.7","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.0","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.0.4","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.8.2","node-sass":"^4.13.0","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.0","slash":"^3.0.0","terser-webpack-plugin":"^2.3.1","unionfs":"^4.2.0","urlsafe-base64":"^1.0.0","webpack":"^4.41.4","webpack-dev-server":"^3.10.1","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-node-resolve":"^6.0.0","@types/cheerio":"^0.22.15","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.0.1","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.8.0","@types/node":"^12.12.18","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.16","@types/react-dom":"^16.9.4","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.0","@types/webpack-dev-server":"^3.9.0","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.12.0","react-dom":"^16.12.0","rimraf":"^3.0.0","rollup":"^1.27.13","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-terser":"^5.1.3","typescript":"^3.7.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"698b8171fc02c50c158a8b37dcf0366414de6423","readme":"## Overview\n\n- Static site generator by using React SSR (Server Side Rendering)\n- Developer Experience\n  - Dynamic `Head` component for better SEO\n  - HMR (Hot Module Replacement) when `process.env.NODE_ENV !== 'production'`\n  - Automatically reflect to the browser as soon as you save the scripts and even if styles\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/static react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"static\",\n    \"build\": \"static build\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ]\n}\n```\n\n**`static.config.js`**:\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n  },\n};\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index() {\n  return <p>Hello Static Site</p>;\n}\n```\n\nFinally,\n\n- run `npm run dev` and you'll see `Hello Static Site` in your browser.\n- run `npm run build` and you'll see the static files in the dist directory.\n\nA working examples are here:\n\n- [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n- [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n- [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n\n## Configuration (`static.config.js`)\n\nHere is the default `static.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: 'dist',\n  viewsDir: 'views',\n  port: 3000,\n  routes: {},\n  publicPaths: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `static.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `static.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `static.config.js#distDir`\n\nThe place where `react-ssr` generates static files. (default: `dist`)\n\n```js\nmodule.exports = {\n  distDir: 'out',\n};\n```\n\n### `static.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\n```js\nmodule.exports = {\n  viewsDir: 'pages',\n};\n```\n\n### `static.config.js#port`\n\nThe port of the development server. (default: `3000`)\n\n```js\nmodule.exports = {\n  port: 4000,\n};\n```\n\n### `static.config.js#routes`\n\nThe key is the route, and the value is the path from the views directory.\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n    '/login': 'auth/login',\n  },\n};\n```\n\n### `static.config.js#publicPaths`\n\nThe place where we put static files like images.\n\n```js\nmodule.exports = {\n  publicPaths: [\n    'public',\n  ],\n};\n```\n\n### `static.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = () => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/static';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.19.7-alpha.3","_nodeVersion":"12.14.0","_npmVersion":"lerna/3.19.0/node@v12.14.0+x64 (darwin)","dist":{"integrity":"sha512-/bK/i3uCH0P/5UfM78mduR7QD5jjV+p3DYZiE+3ZAyuhp4D/9oo6HQgPcIhlPPGb/i1GCdkWvtcXW6OolZRKBA==","shasum":"4387e6ee552c2edb1ebe947290adc4bae677231b","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.19.7-alpha.3.tgz","fileCount":43,"unpackedSize":338860,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd/Nb6CRA9TVsSAnZWagAAGDoP/RqdZWFIhH0VqV66nvwA\nGjOxUhgsUmPl2I1rMPShWBI6u7F70666j6/1BoKjKjDd4Yw+trYJ+dyE2f9V\nlxGr4XjKDwE8wXphnNHFrh216abMLrblXql5+TE2r0Sfg8g0WKJOoDh1LdMM\nv5AP/d3pRo7OqfY68r/N84AL9J6E+PrBg7L+OavERa9xC1nNiklNv/9hRHsX\nw4E+uZ3Iu8L01MlnfOR34Hge8eEL92thRDALz+VLTlq4WP//95k2hdaz40ec\nOtxOCIBk93/EU/yP/bQTQ42dlggsDX/y5lvGXPQsS+wbM1pnv6P/9AfR9fiH\nD/06EWPo9IKZ3XDVzQ3hAneR4jApHjrKSO5R7lKkCyy6t9ZYQlwuRm8DSM5a\nyeFqNY3hV5dPNJRwqYgNvivCkpfAPgw9xbBH4aaEMaOM6R3nWMdor98t/wbb\n5yudZTYmjyqUvyBJe2ybifkgvOx+wvTfsmNW9cHbDIRgxHpvz4CfLpWUl7l7\nRHpMdAAdObDJVPYVCuvMMp46WHjNjk8n9+KZF7yyWwQxqEJj6HMRzsqLBE9i\nQnMuKkis1bzVcLviAQHO62ic2O7AzXUAlTFJCuxcVnrhDmPySCegu2TIsk4c\n6jegtImVNjLI0040QpyOOx6StYpRRTIscv6iT7to/8Qzvqjab3cHj42ITrnp\nN2jS\r\n=kRZt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCHZlKA0EDvCLQHjwKi2DCqR1n6TFQ3VOxYM+L5/zrQLgIhAN/eGN2hMx6/Icpj74Kh28zyof0AxRjr+72Zo24TxerO"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.19.7-alpha.3_1576851194114_0.4552609591291261"},"_hasShrinkwrap":false},"0.19.7":{"name":"@react-ssr/static","version":"0.19.7","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.7.7","@babel/plugin-proposal-class-properties":"^7.7.4","@babel/plugin-proposal-object-rest-spread":"^7.7.7","@babel/plugin-syntax-dynamic-import":"^7.7.4","@babel/plugin-transform-runtime":"^7.7.6","@babel/preset-env":"^7.7.7","@babel/preset-react":"^7.7.4","@babel/preset-typescript":"^7.7.7","@babel/register":"^7.7.7","@babel/runtime":"^7.7.7","@babel/runtime-corejs3":"^7.7.7","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.0","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.0.4","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.8.2","node-sass":"^4.13.0","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.0","slash":"^3.0.0","terser-webpack-plugin":"^2.3.1","unionfs":"^4.2.0","urlsafe-base64":"^1.0.0","webpack":"^4.41.4","webpack-dev-server":"^3.10.1","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-node-resolve":"^6.0.0","@types/cheerio":"^0.22.15","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.0.1","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.8.0","@types/node":"^12.12.18","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.16","@types/react-dom":"^16.9.4","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.0","@types/webpack-dev-server":"^3.9.0","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.12.0","react-dom":"^16.12.0","rimraf":"^3.0.0","rollup":"^1.27.13","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-terser":"^5.1.3","typescript":"^3.7.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"2ab82b3031299561e32a87a35a01d890e676c936","_id":"@react-ssr/static@0.19.7","_nodeVersion":"12.14.0","_npmVersion":"lerna/3.19.0/node@v12.14.0+x64 (darwin)","dist":{"integrity":"sha512-DH7wPMbuI1uqcPYZKGXdPfsODlTjrmvEtDYbaLtH7lDV/qCkqaMiMGqPtbUiHjh1UT70elkXwikoiGD7IM3HRw==","shasum":"5a62d0e879d81fec3315a338eb54ee6292e4fc9b","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.19.7.tgz","fileCount":43,"unpackedSize":338844,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd/NdQCRA9TVsSAnZWagAA20cP/0aQAq3YgPBBkKICFYKJ\nGD3PZdKrhEbbGmbTL5175gk/kHpX2nyjyGE06cjHOd1yZqhrFtXJ7pV4OYIj\nJ9Qr2sOGJkn4ET6zEyRsgirhzx2N4kIkpmU5dx3tco30h0qtArlDRr2dgymT\n81HfptElVD++uWsM31QGF5uR8ouD4CkThczTZJegnzaRth3WurOXo+rNshFH\nb4uuYZMUWAQJgs2Z5MEu0YXseHbLQ1okB3W5kgXDPCb4aZe0cMrQN8wtECgS\nOsgc3V7OKEBNOgAMZUy6uSnZvSqUoopuCkr+XjlzJbMVWpIeof+h62eyCvWV\nvm0anybhL1iAauDDzA0sF02FK05AaIaFeVPgr1oVm5CqBcjt4rC2wzRB2tlI\nMb4hU4FH9Ap/R8kwFRmhk6BEQUHP5AEqxauGn9Oa8IaqGizQ38E+5W21+Lun\nW/QeTBVkMJ2H+VO7QMeV602vFwkC9DmBUN2s+iIUj+1izoYnPnPZe8h7+YiA\nqY7pW/hl+ydjk1CrDH34MkBb+yWZjXd8kVyPLOf68Rsp7+ZBRCubl+o3XLY4\nd5s2Dd44jvDjGKCkgN1h3+INO6OQTWEpD5S0iofiP+47affkF6Q6EXj0NAGv\nKuYVqt8dhD+zmR7OIhc4fJlVthDVHcoZASh64806HJ1uFV2+EzuQhcCc1JvZ\nBbyv\r\n=Z50Q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDmzLjmTbFLV6SD4C4/Rs7Zihf3cumrikOtRhrDQ83zCwIgEjKKPzJC52a4yPuTBKCMO+oCo4LwRvHw6xXYID+saLI="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.19.7_1576851280294_0.6268204160209883"},"_hasShrinkwrap":false,"deprecated":"Deprecated: please use NEXT.js (https://github.com/zeit/next.js) or express-react-views (https://github.com/reactjs/express-react-views)"},"0.19.9":{"name":"@react-ssr/static","version":"0.19.9","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.8.3","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.8.3","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.3","@babel/preset-react":"^7.8.3","@babel/preset-typescript":"^7.8.3","@babel/register":"^7.8.3","@babel/runtime":"^7.8.3","@babel/runtime-corejs3":"^7.8.3","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.2.2","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.9.0","node-sass":"^4.13.0","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.2","slash":"^3.0.0","terser-webpack-plugin":"^2.3.1","unionfs":"^4.2.0","urlsafe-base64":"^1.0.0","webpack":"^4.41.5","webpack-dev-server":"^3.10.1","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-node-resolve":"^6.0.0","@types/cheerio":"^0.22.15","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.0.1","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.8.0","@types/node":"^12.12.18","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.16","@types/react-dom":"^16.9.4","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.0","@types/webpack-dev-server":"^3.9.0","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.12.0","react-dom":"^16.12.0","rimraf":"^3.0.0","rollup":"^1.27.13","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-terser":"^5.1.3","typescript":"^3.7.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"3b318a0dbec60d05139259761b95e4689fb39f74","_id":"@react-ssr/static@0.19.9","_nodeVersion":"12.14.1","_npmVersion":"lerna/3.19.0/node@v12.14.1+x64 (darwin)","dist":{"integrity":"sha512-N4DdWhF/aNhRrxyi5I0BKPJ1Lp3p8Bk1k7frzsmp8MX5wbmaty9HysiFY/rpS+jYhEW96hfTzfmcu5+kdgM17w==","shasum":"484ad52d385747e2b7f85a1a2d37cd1aaba07787","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.19.9.tgz","fileCount":43,"unpackedSize":246848,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeHqPVCRA9TVsSAnZWagAA83wP/RoVOe0Viss5LZgJdSmm\n0X6q+YltnxWZwSoTODnX4mMgLUuUNiLNZCXhIAmKPVt/IRgjCVMUlCjTFx/1\nc5cr0Cj0tdP6Hpnpyu2Pwtd2lkpQXUP5k5TxptfFMQF0qu2AHphN33zDt+Zl\n6279A8zA9glz3SfPcCkKWLTwLhXGI16xChTIns6j/C++o7p8/3E76XYpboMJ\n49Hwyo6sMYR9oagd9ejILMbyvFgOLjcvGGZbPK9TxP5rodklGiyCqghpHnxd\nkXvKEAkpsBhfe7SNKIjF1b+SD9QDJFibtSJoNjFkjRj6zoZOK9fVizXJzdtf\nMjhWxuBiQwwj0cZI6zya/5eIiTGW3e/uINvmVdcEktXIHce+Ooz+OTZOn1rV\nd99ARtVFWU859krJvD675tz/UwS1uUkzFTwRgd1NUoS18LIWlzepkhlq+ilz\nT02Cne+wsTvjtY7xOvrxiGQwRe4ZRZQjumlHX7uRJqe1K3j89fnU5tKcND7B\nTj6TU3LzQ1KxQcFQ88jVivM/hd1z64ZSLMfGLxBTrfDEDvDaQTnN89kQIBvh\n7iFhhQNP7aZPakTD1ct//3hjjI0x+aF5PNR7H93jZFdR0ek4QC1RNB+KF+V3\nDkAUObdtNoJ7v4sBnHtxJkJzUZy7Uto4WGzx7meYoJxxISJY1wOqs48rz5Qy\nkBSt\r\n=c8X8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCScslg7KJu33vWmESTJkVTJ1TfRkknrulFT+vIKwP8lwIhAMGRqXHkAlLSbX7dkEe/EQWn8e+hV7S+wgoDJVLt9mAS"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.19.9_1579066324643_0.645685368027048"},"_hasShrinkwrap":false,"deprecated":"Deprecated: please use NEXT.js (https://github.com/zeit/next.js) or express-react-views (https://github.com/reactjs/express-react-views)"},"0.19.11":{"name":"@react-ssr/static","version":"0.19.11","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.8.6","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.8.3","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.6","@babel/preset-react":"^7.8.3","@babel/preset-typescript":"^7.8.3","@babel/register":"^7.8.6","@babel/runtime":"^7.8.4","@babel/runtime-corejs3":"^7.8.4","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.3","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.6.0","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.9.0","node-sass":"^4.13.1","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.2","slash":"^3.0.0","terser-webpack-plugin":"^2.3.5","unionfs":"^4.3.2","urlsafe-base64":"^1.0.0","webpack":"^4.42.0","webpack-dev-server":"^3.10.3","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-commonjs":"^11.0.2","@rollup/plugin-node-resolve":"^7.1.1","@types/cheerio":"^0.22.16","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.1.0","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.9.1","@types/node":"^13.7.7","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.23","@types/react-dom":"^16.9.5","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.7","@types/webpack-dev-server":"^3.10.0","@types/webpack-merge":"^4.1.5","cross-env":"^7.0.0","react":"^16.13.0","react-dom":"^16.13.0","rimraf":"^3.0.2","rollup":"^1.32.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-terser":"^5.2.0","typescript":"^3.8.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"5db7a89f256a6af6ec5e1f46bf1badd2d7ca754c","_id":"@react-ssr/static@0.19.11","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-8V4YP9m1ztCg0hERK0HaQoSQXImzXltHBnVbx0iPa267rVPJh3S0xV2fETd/0/LmzR/9IYjqnrdPLw1KYiS3GQ==","shasum":"399e3cd455e575266bec592123a04a94a628e23e","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.19.11.tgz","fileCount":39,"unpackedSize":237397,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeXRJOCRA9TVsSAnZWagAA5tgQAJTVqzGVIgo9cSF1JjVZ\nFK66twpKBLd0mFwJu8Q0V7wj8nB1CmUd4iWZrdO6XhQFhqlXr2gCEs/jQrym\nicri8C2Yhu3zNhGN66mQVDxDLjqHHIp/HeYepD9GQbD5FjR1lpUTu4xnaDYs\n07PpRM8uk7smsnEzIBBsmzqJ/U+m9RYXDpN54Xi5GiZFnj+w6GpQSfTnQm1/\nA0j4WNDFbF1nyJbBTZQ5FBJLobHC6gfX+y3U5m15/zY6+Ltu8Z24RXSPROnX\nJTmT5XXbkIVsyZc6YHOZO5gumJemB9OxqTqgs4a4d8ouGnZVfIjjqT1jgTR6\n/dlxl567C12i4noX5CL825o2ZmCbem9wqBaDe5pwG6McYigGaoDVN1phTOLi\nUf5TvDAxyFnvcMIK62hARoDWoH9Lx75pAHwsHEjpMVUHCiNd/a70y3WJZqy1\nbcWt71uS97lO2SAEw9g/4k6om606LeWZECWPNofjYxGObXCWy8xbhUNXTN3E\n28KUBIOuvAtCxKllnOr0dyQ6HTJ/qqHj8mRpZSrqZSdmmfl+ORUhBw2QbNub\nVJ11ILFtfkATXPA4j5QssAnRMXBFktKVNME81O787TtOk+eOqRSJTEKm0Ycb\ncXHy6uDEmtKvo5KlR3JTza8Q4bY/mBPEJLSJtsz4LrKQyMbk/o2oar2b/WwE\n07pG\r\n=DfMC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC+pe115XxdrBMe1uiOj10/GWkcg2DNszgdr4MOS3SBowIgeabxSc1gFi/IzY+kGiyJyN8g43M7SLSF7hbwTApcl7k="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.19.11_1583157837968_0.8644556953500799"},"_hasShrinkwrap":false,"deprecated":"Deprecated: please use NEXT.js (https://github.com/zeit/next.js) or express-react-views (https://github.com/reactjs/express-react-views)"},"0.20.0":{"name":"@react-ssr/static","version":"0.20.0","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.8.6","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.8.3","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.6","@babel/preset-react":"^7.8.3","@babel/preset-typescript":"^7.8.3","@babel/register":"^7.8.6","@babel/runtime":"^7.8.4","@babel/runtime-corejs3":"^7.8.4","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.3","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.6.0","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.9.0","node-sass":"^4.13.1","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.2","slash":"^3.0.0","terser-webpack-plugin":"^2.3.5","unionfs":"^4.3.2","urlsafe-base64":"^1.0.0","webpack":"^4.42.0","webpack-dev-server":"^3.10.3","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-commonjs":"^11.0.2","@rollup/plugin-node-resolve":"^7.1.1","@types/cheerio":"^0.22.16","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.1.0","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.9.1","@types/node":"^13.7.7","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.23","@types/react-dom":"^16.9.5","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.7","@types/webpack-dev-server":"^3.10.0","@types/webpack-merge":"^4.1.5","cross-env":"^7.0.0","react":"^16.13.0","react-dom":"^16.13.0","rimraf":"^3.0.2","rollup":"^1.32.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-terser":"^5.2.0","typescript":"^3.8.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"c10b3653232bf64179f329b2f9db622e0f8a020e","_id":"@react-ssr/static@0.20.0","_nodeVersion":"12.14.1","_npmVersion":"lerna/3.20.2/node@v12.14.1+x64 (win32)","dist":{"integrity":"sha512-zLKzpII4d+52yg8QGIWT1OuFPNWd7MvSC50es9bBZ6eeAXuRfI5OJludEa8nOwlIPk6aqftBJBTMmsBdidKy5g==","shasum":"09eecafde03427f86b4a4050f836b2c3940f7ec1","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.20.0.tgz","fileCount":39,"unpackedSize":238135,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeXW81CRA9TVsSAnZWagAAKLEP/iFHJd7zL0WBthgEjWlL\nseCd+Gid6NO3957QORPSonw8MhY/D+5UELVw7zTbTUhVzwCqFkv52MXfVko/\n13wKXQfBhSCz/dKRXWWApmR3J0JAH07LYeBkDlq7gEDEhexzWBxhGFw/tnF7\nRaCQKkgYGj+fmeh9X+++eU26/U5SIHXjYdDvv6Y3uaTVWB2YOmddukIOILe5\nRaaMPrVDHjjERC1kh0gczd4/e7JfDYeouz9jZ11jP9zlT1wod9wJ7Uk2NITJ\nh0qSAYNRlmebyy4FDWtjfwNAeZJjUzZa0/v/jL+UPqCSgOyWjUCUiVo5wf4R\nh8CPlCUvVTyY5OGvi0XwTp7CNT1KLbQ78CBsH4CEcPyXmaZsgXa+M/uM/m2u\ns0Xn7jBghYb99Rp5G7e7C+0RXBZB/3IaGiqQ0HrOhB0v7Tb5jEB+mYnaYo+q\nJxgi1cBRNfgzXD0QAMdVRSYypUFAY9Cj6AbXurRpHIvOEHNDaE8yMunNKYtC\nfM1DRrbqptY+m/tPhmk1Efpo84hEqTFLSZcoqjGZsI037zksNhh7IxRd4W8H\nhF0ygSGyyMXHUYE+qB+oiu5ocx+xIbtzXJpwqD6YPVtaWf/2NqRsm0yyv5iV\nFNaRPOmZBfXgIy8dRwm5nvZMlSClR+zmghN3g1FTaB9qzxxde0xqUY8dxurD\nJRuf\r\n=riMO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCmZOp3JxiZUaR3ol1Tny3UJVyiyCV/dCiCqvUSblM9BQIhANAg/2N4qGruTiKpdOLXLhcJlHJ/ZFwLixbdl5yOxJCN"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.20.0_1583181620910_0.4828212863125101"},"_hasShrinkwrap":false,"deprecated":"Deprecated: please use NEXT.js (https://github.com/zeit/next.js) or express-react-views (https://github.com/reactjs/express-react-views)"},"0.20.1":{"name":"@react-ssr/static","version":"0.20.1","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.8.7","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.8.3","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.7","@babel/preset-react":"^7.8.3","@babel/preset-typescript":"^7.8.3","@babel/register":"^7.8.6","@babel/runtime":"^7.8.7","@babel/runtime-corejs3":"^7.8.7","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.3","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.6.0","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.9.0","node-sass":"^4.13.1","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.2","slash":"^3.0.0","terser-webpack-plugin":"^2.3.5","unionfs":"^4.3.2","urlsafe-base64":"^1.0.0","webpack":"^4.42.0","webpack-dev-server":"^3.10.3","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-commonjs":"^11.0.2","@rollup/plugin-node-resolve":"^7.1.1","@types/cheerio":"^0.22.16","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.1.0","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.9.1","@types/node":"^13.7.7","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.23","@types/react-dom":"^16.9.5","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.7","@types/webpack-dev-server":"^3.10.0","@types/webpack-merge":"^4.1.5","cross-env":"^7.0.0","react":"^16.13.0","react-dom":"^16.13.0","rimraf":"^3.0.2","rollup":"^1.32.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-terser":"^5.2.0","typescript":"^3.8.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"18b4c95afa75a283f8184cba2208c07a4b7a7257","_id":"@react-ssr/static@0.20.1","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-pLTa+LlwpXbhVWCQ5X/5CNJUU6cquIQd0rVTKOsPIAl7T5NtWpnHtYt/8V00lF6P9hauDxS+G4EZzcpDUN11xw==","shasum":"dbe2a4f4d8336c3b59099a5f3a2de0784433ad29","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.20.1.tgz","fileCount":39,"unpackedSize":237543,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaTAxCRA9TVsSAnZWagAA5JUP/21XFuWR9RUwGuh9S9h8\nVgX8O/mFm5KO9NyPo+HRgbMtYtaHrvgqSvcWpHfILZX4o3vPZY9IXrFS/SVx\n4tdsU3JwyaD0Dhp4JNT8auO5eM5tdmYQevYDJ7u6s9HAvURVLcrXEPUNkaO/\n9213bZynuctjNgE4uuGrnkNGbM1SnQnU5ah87edzFnQvDdGtJDpn8UnRUXp6\nUQqRULXSqBDPtnOznmGERzSbIE6oKKuPw3gq/vSmDz8bNsQoLovbuyTUjoNb\neEQmpuHCYKWFbS+uv37T4UR+ikCQXYO/1K1ahBZ9O1qAmmHNhBkzItNThDNG\nszpHIYyq1+HVqU7DeUjblufkhAM/Tk8KtjAUSgWw47fm6Helk5nEj5p/P1v5\n75UMODUXPwHkcGHVez3zRfeb27QvnGVRd2BKys84PLpUsK6jlqQXts/Fqra/\nBHD6mMb0u5hhU+OSbkIWcSXYde64jEJ5nWp7IrEw3x/b4LBgEs5WN5kVxk+Q\nfIp9SztPrFosGnbaHeRKmG0lrlsONRCf2u/LUSh/Aa5e5VpmQG6i8BJs1tIg\nJ9qEC0nvSl+zsqeRMOmEGagSAfbv0qKYHudW5gNIkkFJm+iPtFIa9tGYDvi1\nLM1SoOQEjaLGyt/qtp4667kFUwKNAIL7bP9XHGL4IRIugCUVzYr777QsZ1VO\ncYny\r\n=ODvn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC/3rLlp2zBh+cTNnXCtSV5HRjgh79rWI1d/7xPkzdz9AIgeKCz/MIWDEHWt9Yac/PxvqvHygk59JIoWTitxQBn35k="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.20.1_1583951921200_0.43924132017011885"},"_hasShrinkwrap":false,"deprecated":"Deprecated: please use NEXT.js (https://github.com/zeit/next.js) or express-react-views (https://github.com/reactjs/express-react-views)"},"0.20.2-alpha.0":{"name":"@react-ssr/static","version":"0.20.2-alpha.0","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.8.7","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.8.3","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.7","@babel/preset-react":"^7.8.3","@babel/preset-typescript":"^7.8.3","@babel/register":"^7.8.6","@babel/runtime":"^7.8.7","@babel/runtime-corejs3":"^7.8.7","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.3","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.6.0","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.9.0","node-sass":"^4.13.1","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.2","slash":"^3.0.0","terser-webpack-plugin":"^2.3.5","unionfs":"^4.3.2","urlsafe-base64":"^1.0.0","webpack":"^4.42.0","webpack-dev-server":"^3.10.3","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-commonjs":"^11.0.2","@rollup/plugin-node-resolve":"^7.1.1","@types/cheerio":"^0.22.16","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.1.0","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.9.1","@types/node":"^13.7.7","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.23","@types/react-dom":"^16.9.5","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.7","@types/webpack-dev-server":"^3.10.0","@types/webpack-merge":"^4.1.5","cross-env":"^7.0.0","react":"^16.13.0","react-dom":"^16.13.0","rimraf":"^3.0.2","rollup":"^1.32.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-terser":"^5.2.0","typescript":"^3.8.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"ad5f9939fdb9dbdc68293f5f5f68f29549a305e6","readme":"## Overview\n\n- Static site generator by using React SSR (Server Side Rendering)\n- Developer Experience\n  - Dynamic `Head` component for better SEO\n  - HMR (Hot Module Replacement) when `process.env.NODE_ENV !== 'production'`\n  - Automatically reflect to the browser as soon as you save the scripts and even if styles\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/static react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"static\",\n    \"build\": \"static build\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ]\n}\n```\n\n**`static.config.js`**:\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n  },\n};\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index() {\n  return <p>Hello Static Site</p>;\n}\n```\n\nFinally,\n\n- run `npm run dev` and you'll see `Hello Static Site` in your browser.\n- run `npm run build` and you'll see the static files in the dist directory.\n\nA working examples are here:\n\n- [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n- [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n- [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n\n## Configuration (`static.config.js`)\n\nHere is the default `static.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: 'dist',\n  viewsDir: 'views',\n  port: 3000,\n  routes: {},\n  publicPaths: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `static.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `static.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `static.config.js#distDir`\n\nThe place where `react-ssr` generates static files. (default: `dist`)\n\n```js\nmodule.exports = {\n  distDir: 'out',\n};\n```\n\n### `static.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\n```js\nmodule.exports = {\n  viewsDir: 'pages',\n};\n```\n\n### `static.config.js#port`\n\nThe port of the development server. (default: `3000`)\n\n```js\nmodule.exports = {\n  port: 4000,\n};\n```\n\n### `static.config.js#routes`\n\nThe key is the route, and the value is the path from the views directory.\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n    '/login': 'auth/login',\n  },\n};\n```\n\n### `static.config.js#publicPaths`\n\nThe place where we put static files like images.\n\n```js\nmodule.exports = {\n  publicPaths: [\n    'public',\n  ],\n};\n```\n\n### `static.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = () => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/static';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.20.2-alpha.0","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-O/GX6uro4Ipk3wmHZ5fp73v99GSHaljtqMTsSPXnnYwiyi1I0iSoTA1YT2Zhu90tvDuceC2RlQ+uIbT/HPF16g==","shasum":"11e2801b65b02ce466374f505bde61e045ddde8c","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.20.2-alpha.0.tgz","fileCount":39,"unpackedSize":239112,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaTE/CRA9TVsSAnZWagAAcTgP/jXIMJ6qezTP5VV8pO3U\nmChdw1eeuMxL6EBSuW4tTFqNtm9kpbXDRAzH/dtWrvP09BoyEEfEtEDD7C3I\nXkBO1Z2O8dPNT6auCXSrdm6WHr2iOgZjuxDd49oTv2/qTGU3vwZ+kHokvEvo\nMW4LcpWVfj1u85ImRbJpLXrsVxtPGh6x4buv2jem1OKg6kJTSkGjDnqKpQdS\nO4/Y4eDv9oslAIKtwZEzGBqBgXS/B6HhHNXh77hm+DS7Z0UTU/wPdeU2lb2Q\nXPtzC7qMN59ZpHg3sAA5P5D78H8EVRr75hHrpkZjXpmCVkBJLeCOekIbzRi0\nts/QxvxykPrb/LDvpUubLXf1Ag3NtUbAI8DTfK9RrQEuaxTF2hBCbeZubIrn\nwqvQzbdXKALS/1x6XBrQgL5T2Z4T05UjQVtHYdAstoXPhne8qqhYrw4T35iJ\n6DFGt/P9a1qO4AiW0Uhgh0Nmb8Rnb2DZUcbGnAgmgi4HE1twldsmmQS0foYt\nopO2tlvb9gfZbCyrmKF7UNRu5N5EllurPdYxqnDkMsBb9r22m67aUu4qU41t\nuCMp44k3MlCrDl2rBD4TBKJBvhg411NxFrhrdWBk6YQ99OeIQEWD7akTvWMI\n+7MiF6P/epjK7c/bDzYK6vzRmgQ0bEWwunyZjM6uPJJhORHqnXUJAuFx58U/\nblOS\r\n=D3K7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD0U9lvK3M+YqWT0OXWu1DOuxjLyd+4X2T6zKWmB1hZOgIhAPm51k0y7RW+0WvS+mB+sVnMmbeAafu0oV93gy7M7FJR"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.20.2-alpha.0_1583952191169_0.1758880198624666"},"_hasShrinkwrap":false},"0.20.2-alpha.1":{"name":"@react-ssr/static","version":"0.20.2-alpha.1","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.8.7","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.8.3","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.7","@babel/preset-react":"^7.8.3","@babel/preset-typescript":"^7.8.3","@babel/register":"^7.8.6","@babel/runtime":"^7.8.7","@babel/runtime-corejs3":"^7.8.7","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.3","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.6.0","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.9.0","node-sass":"^4.13.1","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.2","slash":"^3.0.0","terser-webpack-plugin":"^2.3.5","unionfs":"^4.3.2","urlsafe-base64":"^1.0.0","webpack":"^4.42.0","webpack-dev-server":"^3.10.3","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-commonjs":"^11.0.2","@rollup/plugin-node-resolve":"^7.1.1","@types/cheerio":"^0.22.16","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.1.0","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.9.1","@types/node":"^13.7.7","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.23","@types/react-dom":"^16.9.5","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.7","@types/webpack-dev-server":"^3.10.0","@types/webpack-merge":"^4.1.5","cross-env":"^7.0.0","react":"^16.13.0","react-dom":"^16.13.0","rimraf":"^3.0.2","rollup":"^1.32.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-terser":"^5.2.0","typescript":"^3.8.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"13cf6d412ac110535a9ec9009a88d4a85848c649","readme":"## Overview\n\n- Static site generator by using React SSR (Server Side Rendering)\n- Developer Experience\n  - Dynamic `Head` component for better SEO\n  - HMR (Hot Module Replacement) when `process.env.NODE_ENV !== 'production'`\n  - Automatically reflect to the browser as soon as you save the scripts and even if styles\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/static react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"static\",\n    \"build\": \"static build\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ]\n}\n```\n\n**`static.config.js`**:\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n  },\n};\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index() {\n  return <p>Hello Static Site</p>;\n}\n```\n\nFinally,\n\n- run `npm run dev` and you'll see `Hello Static Site` in your browser.\n- run `npm run build` and you'll see the static files in the dist directory.\n\nA working examples are here:\n\n- [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n- [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n- [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n\n## Configuration (`static.config.js`)\n\nHere is the default `static.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: 'dist',\n  viewsDir: 'views',\n  port: 3000,\n  routes: {},\n  publicPaths: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `static.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `static.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `static.config.js#distDir`\n\nThe place where `react-ssr` generates static files. (default: `dist`)\n\n```js\nmodule.exports = {\n  distDir: 'out',\n};\n```\n\n### `static.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\n```js\nmodule.exports = {\n  viewsDir: 'pages',\n};\n```\n\n### `static.config.js#port`\n\nThe port of the development server. (default: `3000`)\n\n```js\nmodule.exports = {\n  port: 4000,\n};\n```\n\n### `static.config.js#routes`\n\nThe key is the route, and the value is the path from the views directory.\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n    '/login': 'auth/login',\n  },\n};\n```\n\n### `static.config.js#publicPaths`\n\nThe place where we put static files like images.\n\n```js\nmodule.exports = {\n  publicPaths: [\n    'public',\n  ],\n};\n```\n\n### `static.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = () => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/static';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.20.2-alpha.1","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-fXhW4k/hrPp5gbe5wHYT5F20PKfp71P6bj1tM0qMc3OG+XzfhFdqxk5j9cmy+4O9BeV50V0RM8CfoDNr3Fl8uQ==","shasum":"d9d3a0e2a14727c106a64146ad458ce86a4dd270","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.20.2-alpha.1.tgz","fileCount":39,"unpackedSize":239296,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaTRwCRA9TVsSAnZWagAAIJ8P/i1miQuvZUiAB033VqNG\ngTImovSu8UihoMQSUcKdlnuGXTgjPSquEjIlD/CllhbLSFICRflliJBDWC6f\nFcY6zV5xZmxY5iG9r1SQS6fsaKmUGtbqCal3kuY6KFOY/f8fXa/h2cmLdJV2\ny4yZ4c0JD1FXNq1bwdfkr3dT7FA/xK16R15VGP600V0dzwCI4xixrwcMgxRl\nvC8tUNmNO46suDRN3Bxw1MXuSQHmNUfWZUWLwxtUcv6Aa2e2lWSwtXMSk09x\ndnse+v5cMDuRv+rzs0XzSQ2w4coIYChxx5d6XN+SXcWRxpCBvqabjoaHbCcb\nmpfmokpfaBBz3swypwf5nGlhwMkqbhXSz68YKO93ROZIa5J0l2HwlD94ZjEr\nwIHMKKtV/EHvy9/DdwfE7PYg9t4XGHwmUqcWqOh8eDJWYOTSFjH8828BZ9h7\nSH9G8Zk0gK1Pk7XpkGL55rCxCxc8Rc9A6/vB6VYHwS1e0T1YpM3wBBFbxUv8\nt+hFSBn9RkdCdkbV08oN/8FVT43ZrwBOkK8kezzUilejU4LW+Jy/VCly71jU\nKHm0T7x9TYVAZmbLKmMUuvepIxSjey2t9qa97+8a8ijfDYBYk9rM4q2uuJfq\nYCpTScCxpmbd5xOlc47to9hb0KfrxtAA9SlRe00DIxi9FN7mb/O8CKuswAj4\n0uTN\r\n=7cBA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCIuJI4pHVV0ffNskI42LNOZnJoD9mb18j4tQcfakvmpgIgWCxpG6VQ7ozUgf2FtYJWotwhdCyxDFE4RytG7BXHMgM="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.20.2-alpha.1_1583953008153_0.42268581304271113"},"_hasShrinkwrap":false},"0.20.2-alpha.2":{"name":"@react-ssr/static","version":"0.20.2-alpha.2","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.8.7","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.8.3","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.7","@babel/preset-react":"^7.8.3","@babel/preset-typescript":"^7.8.3","@babel/register":"^7.8.6","@babel/runtime":"^7.8.7","@babel/runtime-corejs3":"^7.8.7","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.3","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.6.0","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.9.0","node-sass":"^4.13.1","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.2","slash":"^3.0.0","terser-webpack-plugin":"^2.3.5","unionfs":"^4.3.2","urlsafe-base64":"^1.0.0","webpack":"^4.42.0","webpack-dev-server":"^3.10.3","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-commonjs":"^11.0.2","@rollup/plugin-node-resolve":"^7.1.1","@types/cheerio":"^0.22.16","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.1.0","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.9.1","@types/node":"^13.7.7","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.23","@types/react-dom":"^16.9.5","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.7","@types/webpack-dev-server":"^3.10.0","@types/webpack-merge":"^4.1.5","cross-env":"^7.0.0","react":"^16.13.0","react-dom":"^16.13.0","rimraf":"^3.0.2","rollup":"^1.32.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-terser":"^5.2.0","typescript":"^3.8.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"db965cd6f7d4e792bde48bbb69aa60545647fc40","readme":"## Overview\n\n- Static site generator by using React SSR (Server Side Rendering)\n- Developer Experience\n  - Dynamic `Head` component for better SEO\n  - HMR (Hot Module Replacement) when `process.env.NODE_ENV !== 'production'`\n  - Automatically reflect to the browser as soon as you save the scripts and even if styles\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/static react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"static\",\n    \"build\": \"static build\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ]\n}\n```\n\n**`static.config.js`**:\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n  },\n};\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index() {\n  return <p>Hello Static Site</p>;\n}\n```\n\nFinally,\n\n- run `npm run dev` and you'll see `Hello Static Site` in your browser.\n- run `npm run build` and you'll see the static files in the dist directory.\n\nA working examples are here:\n\n- [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n- [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n- [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n\n## Configuration (`static.config.js`)\n\nHere is the default `static.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: 'dist',\n  viewsDir: 'views',\n  port: 3000,\n  routes: {},\n  publicPaths: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `static.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `static.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `static.config.js#distDir`\n\nThe place where `react-ssr` generates static files. (default: `dist`)\n\n```js\nmodule.exports = {\n  distDir: 'out',\n};\n```\n\n### `static.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\n```js\nmodule.exports = {\n  viewsDir: 'pages',\n};\n```\n\n### `static.config.js#port`\n\nThe port of the development server. (default: `3000`)\n\n```js\nmodule.exports = {\n  port: 4000,\n};\n```\n\n### `static.config.js#routes`\n\nThe key is the route, and the value is the path from the views directory.\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n    '/login': 'auth/login',\n  },\n};\n```\n\n### `static.config.js#publicPaths`\n\nThe place where we put static files like images.\n\n```js\nmodule.exports = {\n  publicPaths: [\n    'public',\n  ],\n};\n```\n\n### `static.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = () => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/static';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.20.2-alpha.2","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-dYJtQwiDr5Vt8Yz5SNtwCUeuCaocXWtrreSyYkkMzXtN65vyUm5lb/1MNeBQOOIdWGLLx9/HchLhr2DmLFEztQ==","shasum":"6d4c31908b3be5275761015067043598bbca0d90","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.20.2-alpha.2.tgz","fileCount":39,"unpackedSize":239406,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaTUNCRA9TVsSAnZWagAAWbQQAIvEYFdMLIoXhawvV6PQ\nhA07qduz7gXVFBQ/1HIzKpfrk7vsz6Oo7Lw7brZmnaNiNtDiJtv5MHHX43s7\nJcV6CnfidIDLSg3eldCC53rIvG7gxJSQqNqSpq0kMsFLtU1h3GtHAg5kYrtd\nvZaIxo+vEJMHojFYjvF9rAmlBe3V3AIhGeGLzh7yitSLy9lF8OjvO4zfr74W\ndQ2aWDTlzui9H6BVOSxATtbQedM5Faj/FBjFY7N4xFJjYM5WFqiC8G20l1ks\nLsjH8JgGnTq/aIbMWGYY7vcb30ihAjBPEGvpFpYzaOXxHf2jCRmDuKchc3+n\np7VkUQPmcKS+gHNzK+wEYNjD1eJV3olzWrtYcsZbRKDoDvqoVS6s9zc4wDD4\nNX1TMyHx2u45Q7+HjMG0WLNGtUuBhtJ/pMjiU6fM5veKsP0UPqPv50wttia3\nDI93FbUFq0RUQqO76paaLsVlK+Z4QYYzOeBmCYwfrfRQ/l3nr49WzXqAxYPY\nXi+EfK0Ppd0tRQGuVBkIaqreaEaWt3DtCib30KPok2ZIjUsBPU9E4jwgVDa4\niSkDVOXjUOPpm6VGsya/y5vGj6qNuZXOz6TsqI9vDZIERrnH6BI3gtd302Vx\nmwQBVkmnWIayxNRYoiz3TcbAGRcLxHLLVbBHaKf6MNJ2r02CYWfpkbXln2WQ\n3xbu\r\n=wJ1U\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEm9YUVY4bByBPDdA9cyEMxPuMQ5lRgrotzw2qXk/ZySAiAzDDF8AcbZJebNa+00oGkD//T7ivpi3o68b0sJZ6NHeQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.20.2-alpha.2_1583953165400_0.04936524952134169"},"_hasShrinkwrap":false},"0.20.2-alpha.3":{"name":"@react-ssr/static","version":"0.20.2-alpha.3","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.8.7","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.8.3","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.7","@babel/preset-react":"^7.8.3","@babel/preset-typescript":"^7.8.3","@babel/register":"^7.8.6","@babel/runtime":"^7.8.7","@babel/runtime-corejs3":"^7.8.7","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.3","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.6.0","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.9.0","node-sass":"^4.13.1","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.2","slash":"^3.0.0","terser-webpack-plugin":"^2.3.5","unionfs":"^4.3.2","urlsafe-base64":"^1.0.0","webpack":"^4.42.0","webpack-dev-server":"^3.10.3","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-commonjs":"^11.0.2","@rollup/plugin-node-resolve":"^7.1.1","@types/cheerio":"^0.22.16","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.1.0","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.9.1","@types/node":"^13.7.7","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.23","@types/react-dom":"^16.9.5","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.7","@types/webpack-dev-server":"^3.10.0","@types/webpack-merge":"^4.1.5","cross-env":"^7.0.0","react":"^16.13.0","react-dom":"^16.13.0","rimraf":"^3.0.2","rollup":"^1.32.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-terser":"^5.2.0","typescript":"^3.8.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"b3ed8812fc61af3c12a2b32f8577008443311e53","readme":"## Overview\n\n- Static site generator by using React SSR (Server Side Rendering)\n- Developer Experience\n  - Dynamic `Head` component for better SEO\n  - HMR (Hot Module Replacement) when `process.env.NODE_ENV !== 'production'`\n  - Automatically reflect to the browser as soon as you save the scripts and even if styles\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/static react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"static\",\n    \"build\": \"static build\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ]\n}\n```\n\n**`static.config.js`**:\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n  },\n};\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index() {\n  return <p>Hello Static Site</p>;\n}\n```\n\nFinally,\n\n- run `npm run dev` and you'll see `Hello Static Site` in your browser.\n- run `npm run build` and you'll see the static files in the dist directory.\n\nA working examples are here:\n\n- [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n- [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n- [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n\n## Configuration (`static.config.js`)\n\nHere is the default `static.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: 'dist',\n  viewsDir: 'views',\n  port: 3000,\n  routes: {},\n  publicPaths: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `static.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `static.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `static.config.js#distDir`\n\nThe place where `react-ssr` generates static files. (default: `dist`)\n\n```js\nmodule.exports = {\n  distDir: 'out',\n};\n```\n\n### `static.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\n```js\nmodule.exports = {\n  viewsDir: 'pages',\n};\n```\n\n### `static.config.js#port`\n\nThe port of the development server. (default: `3000`)\n\n```js\nmodule.exports = {\n  port: 4000,\n};\n```\n\n### `static.config.js#routes`\n\nThe key is the route, and the value is the path from the views directory.\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n    '/login': 'auth/login',\n  },\n};\n```\n\n### `static.config.js#publicPaths`\n\nThe place where we put static files like images.\n\n```js\nmodule.exports = {\n  publicPaths: [\n    'public',\n  ],\n};\n```\n\n### `static.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = () => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/static';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.20.2-alpha.3","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-i6TF/7/snubNSIEKEu5L2qrkbAyhZ9y50ucfxdv1cpXO7Wry0Pg2aISXnYtodAUsmkINkS2jXIR6AI7VKmx2eQ==","shasum":"4d1870c19a3a3b4ab6f42df02ff3ef4a44437100","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.20.2-alpha.3.tgz","fileCount":39,"unpackedSize":239320,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaTWYCRA9TVsSAnZWagAA1jwP/3o6WZoNS5cuFwW/Sstj\n2FS+vgGLWqSswhyh7/RqbsjGgJqUnz4k5LheVcgMOQDClF2ME4N4nniqXQQP\ngVRf3P0AgS7IL3z3lb0fEvdBe78XruEm8Vx2stAhQROc237zoUUhOwqdKCl6\nnrcjya3J+/+b4ygSR6SaFonBQyCSEuhTo2lK+dgW97DZSKpcMg7gmbkYwfyz\nNMmuDlZnlN8I/LetC9gXDgZB8YxSuZXV9Me9b2QU3E3i+1X+vRemmtsxOrWp\nMMLNWfFKMYncVWXqbfl89iirlmuIlfp+Y+ez5tfl5iFuhDDRLh62zN1hjQ43\n/6OcUBQEYQDFiX2bcHF1s5H4U461D3iQEl/w6dkqFRKcRXnxkdlscDjzAeXj\nAcCLJ5wJTk+FPlJQZdHSA9mK0EPhCEH41NcF74HckNPWTg6XCjECxR5c1jM+\nQu7m9DUOmbSaFteNQUZ+wFiPZG5scSwplNPKkIpvBwXPaXywW8D+IpBeBFi4\nh9XCMZZISWilPJjOLPAVmV+GinqSy7pMvcHRM2e0xRJ6iKjFxxpwcd0coOdv\n4czYEgqqkcunYn6bQFd8tMo5F/uxTV2czQfjhszQIx90gCjk87HCA3nci7J7\nBJwWyet7M/I5jCYelwBrnQwt5TljWXBW4u75GSN8jBXAbiV+zoqZSt5UAk7U\n159W\r\n=81QT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDfAaCZYf1F2KoQCT1z89gkx80jRtOQA+hWDEwY2kL7cAIhAPGGD8buWdm3GfB8IMAU0NzplcYg61+Ok8gr+GplvsSC"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.20.2-alpha.3_1583953304402_0.9174286513096066"},"_hasShrinkwrap":false},"0.20.2-alpha.4":{"name":"@react-ssr/static","version":"0.20.2-alpha.4","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.8.7","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.8.3","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.7","@babel/preset-react":"^7.8.3","@babel/preset-typescript":"^7.8.3","@babel/register":"^7.8.6","@babel/runtime":"^7.8.7","@babel/runtime-corejs3":"^7.8.7","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.3","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.6.0","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.9.0","node-sass":"^4.13.1","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.2","slash":"^3.0.0","terser-webpack-plugin":"^2.3.5","unionfs":"^4.3.2","urlsafe-base64":"^1.0.0","webpack":"^4.42.0","webpack-dev-server":"^3.10.3","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-commonjs":"^11.0.2","@rollup/plugin-node-resolve":"^7.1.1","@types/cheerio":"^0.22.16","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.1.0","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.9.1","@types/node":"^13.7.7","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.23","@types/react-dom":"^16.9.5","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.7","@types/webpack-dev-server":"^3.10.0","@types/webpack-merge":"^4.1.5","cross-env":"^7.0.0","react":"^16.13.0","react-dom":"^16.13.0","rimraf":"^3.0.2","rollup":"^1.32.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-terser":"^5.2.0","typescript":"^3.8.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"c668dc9cef84acf6d8d5cd0e9f5f3e6585780ae6","readme":"## Overview\n\n- Static site generator by using React SSR (Server Side Rendering)\n- Developer Experience\n  - Dynamic `Head` component for better SEO\n  - HMR (Hot Module Replacement) when `process.env.NODE_ENV !== 'production'`\n  - Automatically reflect to the browser as soon as you save the scripts and even if styles\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/static react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"static\",\n    \"build\": \"static build\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ]\n}\n```\n\n**`static.config.js`**:\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n  },\n};\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index() {\n  return <p>Hello Static Site</p>;\n}\n```\n\nFinally,\n\n- run `npm run dev` and you'll see `Hello Static Site` in your browser.\n- run `npm run build` and you'll see the static files in the dist directory.\n\nA working examples are here:\n\n- [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n- [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n- [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n\n## Configuration (`static.config.js`)\n\nHere is the default `static.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: 'dist',\n  viewsDir: 'views',\n  port: 3000,\n  routes: {},\n  publicPaths: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `static.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `static.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `static.config.js#distDir`\n\nThe place where `react-ssr` generates static files. (default: `dist`)\n\n```js\nmodule.exports = {\n  distDir: 'out',\n};\n```\n\n### `static.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\n```js\nmodule.exports = {\n  viewsDir: 'pages',\n};\n```\n\n### `static.config.js#port`\n\nThe port of the development server. (default: `3000`)\n\n```js\nmodule.exports = {\n  port: 4000,\n};\n```\n\n### `static.config.js#routes`\n\nThe key is the route, and the value is the path from the views directory.\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n    '/login': 'auth/login',\n  },\n};\n```\n\n### `static.config.js#publicPaths`\n\nThe place where we put static files like images.\n\n```js\nmodule.exports = {\n  publicPaths: [\n    'public',\n  ],\n};\n```\n\n### `static.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = () => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/static';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.20.2-alpha.4","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-UOFuHjMQC2fBlGbllSBybqlKEL8amjUkEDMgFVEAfIJVVKpwxicFPzgjHD0k7VQNbVsFv0NJkPNltZ1BAaE1Zg==","shasum":"a4b9cde52ebc9073a41f358f8c6cd29ef9728437","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.20.2-alpha.4.tgz","fileCount":39,"unpackedSize":239354,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaTYuCRA9TVsSAnZWagAADNMP/1ifoTT3o+Xl3UwuTe/U\nP8y0VbQwKbnWceAgz1aS/2HaErXSHIBffmOVBdbDcm6Ta88a4sl1sZvQle5j\nQixuerLlyR2BEUSuDUEsIA32ny3ljVa4aBAe2yKlcfQi0G8HcdXE+gLla4C7\njbM4jL7pJB9axvmAVN5rQ/EZCagrMRqwKG+P1vI8oXwr4gm2cML2JKCW2IPC\nUu0lb9/JZCP2AR0vZUXvSqW9zbRCIybzfmnVpE5zaRotcwH0h0sv9VjZSmDP\nDpMvWywjNvrgT2bKbferzWaapV3bZ3ZI5K+tdN9iRP5Y+qxsg8j+sMuk4Ojl\ncs7jA4zSNuikCrqHtj0n5I4w9rRZPNLuJYCNACtZzJEQYBeOcQleffG5ILEu\nr7foDRgfSAKoQWkbTkpvSWoBOvf4admicRRjSBUOEVEMVZZ+pNHO9akCrHoG\nxNGuGLVyNrHzA0QoQCEvOBIse/X0C55oDp0Hr2wL3PWjyvrxJ3NjCS3sM+UE\nywVmqU4pjAub0WbuD34hbqAnvZ0MoraTUe+x9a6LLqTYXVT98yNMeNKln9EP\nVfUnrRETqGqF0AMzhdc2ZmN/S9ltrhn2WNmxue7LgNoKyzqnTOkKllRckytH\n3vOHmUMlVzQS2FBOXUeJnIjW96oOFxHDK+t/xRe9cBmeCocSuLOF0cI/EwZX\nS8oM\r\n=ShSz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFwN+CnT6LWTJGUGOLawrcugPyrPl1Y2BBqxAS4VRtDmAiBzk/DIPAxVFHIT4Ke98AfN2FS66oUfXlbq7DvVmlV/kQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.20.2-alpha.4_1583953453745_0.5358092488531989"},"_hasShrinkwrap":false},"0.20.2-alpha.5":{"name":"@react-ssr/static","version":"0.20.2-alpha.5","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.8.7","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.8.3","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.7","@babel/preset-react":"^7.8.3","@babel/preset-typescript":"^7.8.3","@babel/register":"^7.8.6","@babel/runtime":"^7.8.7","@babel/runtime-corejs3":"^7.8.7","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.3","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.6.0","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.9.0","node-sass":"^4.13.1","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.2","slash":"^3.0.0","terser-webpack-plugin":"^2.3.5","unionfs":"^4.3.2","urlsafe-base64":"^1.0.0","webpack":"^4.42.0","webpack-dev-server":"^3.10.3","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-commonjs":"^11.0.2","@rollup/plugin-node-resolve":"^7.1.1","@types/cheerio":"^0.22.16","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.1.0","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.9.1","@types/node":"^13.7.7","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.23","@types/react-dom":"^16.9.5","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.7","@types/webpack-dev-server":"^3.10.0","@types/webpack-merge":"^4.1.5","cross-env":"^7.0.0","react":"^16.13.0","react-dom":"^16.13.0","rimraf":"^3.0.2","rollup":"^1.32.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-terser":"^5.2.0","typescript":"^3.8.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"116cf50ab88182b92ad1173943a042244f78a4b6","readme":"## Overview\n\n- Static site generator by using React SSR (Server Side Rendering)\n- Developer Experience\n  - Dynamic `Head` component for better SEO\n  - HMR (Hot Module Replacement) when `process.env.NODE_ENV !== 'production'`\n  - Automatically reflect to the browser as soon as you save the scripts and even if styles\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/static react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"static\",\n    \"build\": \"static build\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ]\n}\n```\n\n**`static.config.js`**:\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n  },\n};\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index() {\n  return <p>Hello Static Site</p>;\n}\n```\n\nFinally,\n\n- run `npm run dev` and you'll see `Hello Static Site` in your browser.\n- run `npm run build` and you'll see the static files in the dist directory.\n\nA working examples are here:\n\n- [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n- [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n- [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n\n## Configuration (`static.config.js`)\n\nHere is the default `static.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: 'dist',\n  viewsDir: 'views',\n  port: 3000,\n  routes: {},\n  publicPaths: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `static.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `static.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `static.config.js#distDir`\n\nThe place where `react-ssr` generates static files. (default: `dist`)\n\n```js\nmodule.exports = {\n  distDir: 'out',\n};\n```\n\n### `static.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\n```js\nmodule.exports = {\n  viewsDir: 'pages',\n};\n```\n\n### `static.config.js#port`\n\nThe port of the development server. (default: `3000`)\n\n```js\nmodule.exports = {\n  port: 4000,\n};\n```\n\n### `static.config.js#routes`\n\nThe key is the route, and the value is the path from the views directory.\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n    '/login': 'auth/login',\n  },\n};\n```\n\n### `static.config.js#publicPaths`\n\nThe place where we put static files like images.\n\n```js\nmodule.exports = {\n  publicPaths: [\n    'public',\n  ],\n};\n```\n\n### `static.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = () => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/static';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.20.2-alpha.5","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-epNy4eJ3Wo/CqQTKuBHWcore8McOsbwI32ZKU3JomNkcIwc2bQYUlByc4hGdghIySfuK6P5mt841Qz7jDAah6Q==","shasum":"227b1c43ab2fc410c21905f7567bdaa41a0a85eb","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.20.2-alpha.5.tgz","fileCount":39,"unpackedSize":239570,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaTeACRA9TVsSAnZWagAACUMP/3Wg2cA0k4Rk3SaXkFfS\nOYTVATA+10e8KqKZKdezDh4Y8F9FnmcL3T6Ilt+gBb1sflV4rA+WIRdtBFPT\njBXOdkkqccKmfmt8jBCKmkfdGf+GIl9FGp0O4Sou6MOJ3OghUgz34JEUjQPk\nZiDMlXGoJ1GE7NPo0UIYapmpQh/QT8bjsWcKYMf6QcrxC9vOw3OXuuRdH4sV\nnFTl4/k0AGAhgv+pelkdwTQU9YEv7moaC2nYBTH4ttiZIcmmfcWT3KdFL0qV\ngPdshldoccjmLOcO2QVDaSrKhLk5DrKdiCaPUgoz5GBvFETgY+65Wns/Suxi\nHUiGPKwXP1XcAA2/d3e3uHiSIpLGy8nHARv6mGPx3FT2EWBEsxBrfTvs/lY2\nz/jFemhENy4YJmnhVMMEKjBO9pB6m+uNlSDNGkqIKWN79mkmVtpBMJRRY7Ox\nE0v3XaB8Tewf3vNStWc5SxzIpas3R7lwV7fIw+VPLVWkElU8J2TU+ePhFOOI\nghHhiPtGCXsxPYEgTE/6fhYick2rx3LTQlpZCv4sOrcODVxlJ5Z21q9cmN5N\nBBRlPziGi593IheX99ClR1klliZcyE5+BGFuakwT8qE+3kxvMHCHncoiiEAr\nJALWXn/6vyT7gWtjegpnwS+GEpKHH5icQ8lPnvWgypl8il9+xlW1sAvm3nMk\nlPnh\r\n=G/hV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG4ElaohBabKWIhGlEI3aZEzv8pszbIS+7aDuj2MghYxAiB6Jn6yNzBOfomxZ/GPUN09TboC+wUJDpiwTpeHGie6gg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.20.2-alpha.5_1583953791593_0.25583551326396003"},"_hasShrinkwrap":false},"0.20.2-alpha.6":{"name":"@react-ssr/static","version":"0.20.2-alpha.6","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.8.7","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.8.3","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.7","@babel/preset-react":"^7.8.3","@babel/preset-typescript":"^7.8.3","@babel/register":"^7.8.6","@babel/runtime":"^7.8.7","@babel/runtime-corejs3":"^7.8.7","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.3","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.6.0","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.9.0","node-sass":"^4.13.1","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.2","slash":"^3.0.0","terser-webpack-plugin":"^2.3.5","unionfs":"^4.3.2","urlsafe-base64":"^1.0.0","webpack":"^4.42.0","webpack-dev-server":"^3.10.3","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-commonjs":"^11.0.2","@rollup/plugin-node-resolve":"^7.1.1","@types/cheerio":"^0.22.16","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.1.0","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.9.1","@types/node":"^13.7.7","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.23","@types/react-dom":"^16.9.5","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.7","@types/webpack-dev-server":"^3.10.0","@types/webpack-merge":"^4.1.5","cross-env":"^7.0.0","react":"^16.13.0","react-dom":"^16.13.0","rimraf":"^3.0.2","rollup":"^1.32.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-terser":"^5.2.0","typescript":"^3.8.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"bd9f1fcda4aafe23832665b534387e798ba78140","readme":"## Overview\n\n- Static site generator by using React SSR (Server Side Rendering)\n- Developer Experience\n  - Dynamic `Head` component for better SEO\n  - HMR (Hot Module Replacement) when `process.env.NODE_ENV !== 'production'`\n  - Automatically reflect to the browser as soon as you save the scripts and even if styles\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/static react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"static\",\n    \"build\": \"static build\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ]\n}\n```\n\n**`static.config.js`**:\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n  },\n};\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index() {\n  return <p>Hello Static Site</p>;\n}\n```\n\nFinally,\n\n- run `npm run dev` and you'll see `Hello Static Site` in your browser.\n- run `npm run build` and you'll see the static files in the dist directory.\n\nA working examples are here:\n\n- [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n- [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n- [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n\n## Configuration (`static.config.js`)\n\nHere is the default `static.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: 'dist',\n  viewsDir: 'views',\n  port: 3000,\n  routes: {},\n  publicPaths: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `static.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `static.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `static.config.js#distDir`\n\nThe place where `react-ssr` generates static files. (default: `dist`)\n\n```js\nmodule.exports = {\n  distDir: 'out',\n};\n```\n\n### `static.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\n```js\nmodule.exports = {\n  viewsDir: 'pages',\n};\n```\n\n### `static.config.js#port`\n\nThe port of the development server. (default: `3000`)\n\n```js\nmodule.exports = {\n  port: 4000,\n};\n```\n\n### `static.config.js#routes`\n\nThe key is the route, and the value is the path from the views directory.\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n    '/login': 'auth/login',\n  },\n};\n```\n\n### `static.config.js#publicPaths`\n\nThe place where we put static files like images.\n\n```js\nmodule.exports = {\n  publicPaths: [\n    'public',\n  ],\n};\n```\n\n### `static.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = () => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/static';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.20.2-alpha.6","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-M+8M8vd/wsfoc7TVeLM9/Kz/j92HJikeDFiBZH7vOl0msIMB53jW0CG4KiLTXiF5X8776zlfR9nsiOP+huUJiQ==","shasum":"235dd45d13d8a853b0d2f2cd868202f1f8b2405b","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.20.2-alpha.6.tgz","fileCount":50,"unpackedSize":303324,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaTj1CRA9TVsSAnZWagAAxsYP/2RsY8We0IMWmsinLlvD\nmrrFYACseVIj1FuNQLUNZQqU1UZS4J1FZuXId2hf9ey6CLpk3XYlETh/lVx7\nwmff6A+6S64WIrekulCR4C3IIQNCDnsHs6FbFx4vi6PK1EqTqy73v18DVCkv\nofGQNO+kua8hLOaaoT3IN6VsV7GP1tfZ6PDMEzEVbuUwfEKITlhKxYimCex8\nJTGvG7RAsENA2vqZLOZJpHxeE6voFTj8gGhBEUTNLuET/4Vtu1fXSjqLQWkg\nEWSylX6AfTkv5C05JmrzRWuNjT/UpkVp0B9scsYGJGVJyek8JzBp6qVdRoAf\nC/yh3w1XrfODtR5OG6yL4tjqH8GXkqZktL+99xTv0Dmye3nQHvgtMPfooiIZ\noaC9WIBK/ft2MP7Mvn3xBf5vBl1dzWBvFkEXXiywbuFt3TIKAyO472CpEc4E\nVX3a3tweeBF5hPG9AaPJPRNoEe1BKzetI6BU9dLpx5qVtjoTRvDO1zGGlHrk\nUrKutADPZ6ZyWtseHVuJEUKGHG9bMJYyJFqs/rRB9LY0uK669PJXSoLkrnbf\n1Oh/hwTMCf7AdqsEF69oM53LvVlshxqvx4Jlz+rXa86v7AZaA3c4Fa4U6ym2\nWopKbG475WwSclGnWXTZS+usV27hkSunnpe0KignL4VnEmtn789jMABHj9nG\nw1Nh\r\n=m9Uo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC/S4h+Usm4SeGs/DugxbY1GtHJ04g5tCYU8RWqeEfwNwIhAMA1K9q67TDoOCpTgB7BGLnmVlCt2499ydPL3jJ4LPLj"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.20.2-alpha.6_1583954164608_0.0408750670299558"},"_hasShrinkwrap":false},"0.20.2-alpha.7":{"name":"@react-ssr/static","version":"0.20.2-alpha.7","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.8.7","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.8.3","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.7","@babel/preset-react":"^7.8.3","@babel/preset-typescript":"^7.8.3","@babel/register":"^7.8.6","@babel/runtime":"^7.8.7","@babel/runtime-corejs3":"^7.8.7","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.3","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.6.0","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.9.0","node-sass":"^4.13.1","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.2","slash":"^3.0.0","terser-webpack-plugin":"^2.3.5","unionfs":"^4.3.2","urlsafe-base64":"^1.0.0","webpack":"^4.42.0","webpack-dev-server":"^3.10.3","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-commonjs":"^11.0.2","@rollup/plugin-node-resolve":"^7.1.1","@types/cheerio":"^0.22.16","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.1.0","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.9.1","@types/node":"^13.7.7","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.23","@types/react-dom":"^16.9.5","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.7","@types/webpack-dev-server":"^3.10.0","@types/webpack-merge":"^4.1.5","cross-env":"^7.0.0","react":"^16.13.0","react-dom":"^16.13.0","rimraf":"^3.0.2","rollup":"^1.32.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-terser":"^5.2.0","typescript":"^3.8.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"913689af74448a236db2f6351201d6e6ef96c3a4","readme":"## Overview\n\n- Static site generator by using React SSR (Server Side Rendering)\n- Developer Experience\n  - Dynamic `Head` component for better SEO\n  - HMR (Hot Module Replacement) when `process.env.NODE_ENV !== 'production'`\n  - Automatically reflect to the browser as soon as you save the scripts and even if styles\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/static react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"static\",\n    \"build\": \"static build\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ]\n}\n```\n\n**`static.config.js`**:\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n  },\n};\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index() {\n  return <p>Hello Static Site</p>;\n}\n```\n\nFinally,\n\n- run `npm run dev` and you'll see `Hello Static Site` in your browser.\n- run `npm run build` and you'll see the static files in the dist directory.\n\nA working examples are here:\n\n- [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n- [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n- [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n\n## Configuration (`static.config.js`)\n\nHere is the default `static.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: 'dist',\n  viewsDir: 'views',\n  port: 3000,\n  routes: {},\n  publicPaths: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `static.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `static.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `static.config.js#distDir`\n\nThe place where `react-ssr` generates static files. (default: `dist`)\n\n```js\nmodule.exports = {\n  distDir: 'out',\n};\n```\n\n### `static.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\n```js\nmodule.exports = {\n  viewsDir: 'pages',\n};\n```\n\n### `static.config.js#port`\n\nThe port of the development server. (default: `3000`)\n\n```js\nmodule.exports = {\n  port: 4000,\n};\n```\n\n### `static.config.js#routes`\n\nThe key is the route, and the value is the path from the views directory.\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n    '/login': 'auth/login',\n  },\n};\n```\n\n### `static.config.js#publicPaths`\n\nThe place where we put static files like images.\n\n```js\nmodule.exports = {\n  publicPaths: [\n    'public',\n  ],\n};\n```\n\n### `static.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = () => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/static';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.20.2-alpha.7","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-MBBKcAGC497LRdtBD9NCrQ3qLN0WCDjW14BYim3dvMkVO2X4EuXG/tlfatvACnLryEwHQWSFV/XzU6jvxWSAIg==","shasum":"71d696a6f4713a519ea5a7e2fb728e7a27f99c41","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.20.2-alpha.7.tgz","fileCount":39,"unpackedSize":239298,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaToqCRA9TVsSAnZWagAAMwEP/RMuOD3XoSesgnxHgEDN\n8MGYCca+0X5klqZ1/b2WO7j+Kou4QCZJS1QwlyEu1dWRYvHqBvYhdo751gsB\n/GvCoiGQOcYwI0q7F1Qt1uNKi7lAYVXyriBTptiTyQ8MgkHM/rtv/EYOdkBF\nwp2/GsqBvx+i09+Gb1hcVQTQQMhrJh3yhqsmX62+mJMVNfBYO+lXnfNQbhG2\nka2iCW3tPPIpIRB2brSqpiaeBx+7uo8RlKpptb2Ipq9MaOCLVfAHkL+mwxZU\nFsfHrMtQJgJZUGAT+HMYNljY4pXk6LZlQuMkN/HlP6OA4He1zO7s2RPQG1Te\nM1gxhU+Ur5b4x50lCB7JjApnMZgcSvlf9O8jrUeuutthZgqPPaW7oosKx3Rg\nPQTBjJDdRTxTV+DcBkVQXpEXsWrM68qADxxA5eBfcBaOJ0eERCOcs4On2qZY\nKjPot51w3TBEVUUOfasS+MQmkKQVo0B9BgT1KNJ+gelT5H2j3CLXbU32JhvD\nQcFBhRNpooqUJSySrb99Bt0tpcVgwJ2WLV3tJbTnaQhvVZI78yO4OnT++T/8\nCRItFCp5TbphSH+dY+UYWj0K5hA1HWV4wXZMsY+LrPLtQVh9ZJqgN+N6bVaV\n2grwXygqDquWJMcJ/N79LXBmL9yUUQ7VlPovevj9CjbaPr7hw2OkWMTqnXHI\nT/nQ\r\n=6Ap1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDwY/ElLzTIAvSYm8jBsRG85K8RH0djVw1zwn1P5HTFJAiEAkGT+waOGOW3zhXEzx6sg74lMG3JeuOAyj9+jk+pBn6A="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.20.2-alpha.7_1583954474398_0.8791345570042377"},"_hasShrinkwrap":false},"0.20.2-alpha.8":{"name":"@react-ssr/static","version":"0.20.2-alpha.8","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.8.7","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.8.3","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.7","@babel/preset-react":"^7.8.3","@babel/preset-typescript":"^7.8.3","@babel/register":"^7.8.6","@babel/runtime":"^7.8.7","@babel/runtime-corejs3":"^7.8.7","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.3","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.6.0","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.9.0","node-sass":"^4.13.1","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.2","slash":"^3.0.0","terser-webpack-plugin":"^2.3.5","unionfs":"^4.3.2","urlsafe-base64":"^1.0.0","webpack":"^4.42.0","webpack-dev-server":"^3.10.3","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-commonjs":"^11.0.2","@rollup/plugin-node-resolve":"^7.1.1","@types/cheerio":"^0.22.16","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.1.0","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.9.1","@types/node":"^13.7.7","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.23","@types/react-dom":"^16.9.5","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.7","@types/webpack-dev-server":"^3.10.0","@types/webpack-merge":"^4.1.5","cross-env":"^7.0.0","react":"^16.13.0","react-dom":"^16.13.0","rimraf":"^3.0.2","rollup":"^1.32.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-terser":"^5.2.0","typescript":"^3.8.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"b00e538e48a95da3d47ef8e201bcb2a74c71da68","readme":"## Overview\n\n- Static site generator by using React SSR (Server Side Rendering)\n- Developer Experience\n  - Dynamic `Head` component for better SEO\n  - HMR (Hot Module Replacement) when `process.env.NODE_ENV !== 'production'`\n  - Automatically reflect to the browser as soon as you save the scripts and even if styles\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/static react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"static\",\n    \"build\": \"static build\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ]\n}\n```\n\n**`static.config.js`**:\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n  },\n};\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index() {\n  return <p>Hello Static Site</p>;\n}\n```\n\nFinally,\n\n- run `npm run dev` and you'll see `Hello Static Site` in your browser.\n- run `npm run build` and you'll see the static files in the dist directory.\n\nA working examples are here:\n\n- [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n- [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n- [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n\n## Configuration (`static.config.js`)\n\nHere is the default `static.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: 'dist',\n  viewsDir: 'views',\n  port: 3000,\n  routes: {},\n  publicPaths: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `static.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `static.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `static.config.js#distDir`\n\nThe place where `react-ssr` generates static files. (default: `dist`)\n\n```js\nmodule.exports = {\n  distDir: 'out',\n};\n```\n\n### `static.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\n```js\nmodule.exports = {\n  viewsDir: 'pages',\n};\n```\n\n### `static.config.js#port`\n\nThe port of the development server. (default: `3000`)\n\n```js\nmodule.exports = {\n  port: 4000,\n};\n```\n\n### `static.config.js#routes`\n\nThe key is the route, and the value is the path from the views directory.\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n    '/login': 'auth/login',\n  },\n};\n```\n\n### `static.config.js#publicPaths`\n\nThe place where we put static files like images.\n\n```js\nmodule.exports = {\n  publicPaths: [\n    'public',\n  ],\n};\n```\n\n### `static.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = () => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/static';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.20.2-alpha.8","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-hJPoaSFYQCeVX4F5PVv0yg3SJ352bSScSC9guzpDmHJB5+h1KyUsOnVuTHHzrYqfN+QhGDHpTOcieHinK+RAVA==","shasum":"34c62cb3aa98ddc29698e3ffbb446dac504ea9a4","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.20.2-alpha.8.tgz","fileCount":39,"unpackedSize":239520,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaTqgCRA9TVsSAnZWagAA7P0QAIK3IPE2cFaWf67Qd6tc\n7xRn2fni7ISdeXTK9brvJb5apL/ehW63AVR25j3Xoj6jmpaxR/v08vDzz9qe\nk2FWHYDNUKPWGrzHRqT5FeVNiwAPFhLz6TSA25vlM/h9JPt6xEGLpP0h8pZI\nw/HRqLT5dgAIzC8bCGrifOz0voJ2w7QBxA2PYKam3lLggyperHNQkYAVul7u\nqDdqte3ai4HB6cMKkdck2KL33leqltlHKzV487n2WuX0qL2rjb31VzUp53yZ\nXwJ9PqEN/nyNQdhnFxU3UI2BcFM6+3VBTkthe3xOLtVPxxBpFpX6UxJLk2WW\nVlCVnHNE4QJzCbIP5LrO6ao7hfHtb1or6N0g/UZb+oa7Qs338YjIql68ZDwq\nSUfAbLIlAgDsSjVgkzAu9vm86zgoWVXkjK81LlUnLSKz82ewFJuE60ZfArdp\ndP59HvlklE0IqYeATLIdragD0U5W5tWHuqebPOjUkLHLTESE2pBb/IOMrPfI\neVyy1RnqxeBfJWoF1kWrwY5hFQVF0Ui1oUPn6VdkfK9QmCwI8y7nq8ur4yIE\ngk6Yi3nA+/0uUTDt5IhWJl1KTUEWqF1kZ0HgDu2WHczB0oxub+PloLFrImcc\nKR7pPgsjeYaE7V1/0BFvtd9WoYnIP9FlqeQPDXyvDVZUe4WZt3JxR39LFz+2\nj8Bk\r\n=oyQR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBxT/gGLeJ5xT505RhgmYYg/tZlxWeACdc7NQ0ZzWD1PAiEA9uB7ffLJ9fvHOBgsQx7dNAfQuWFT8vwK5QPjKIw7mYA="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.20.2-alpha.8_1583954592537_0.5692874255514084"},"_hasShrinkwrap":false},"0.20.2-alpha.9":{"name":"@react-ssr/static","version":"0.20.2-alpha.9","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.8.7","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.8.3","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.7","@babel/preset-react":"^7.8.3","@babel/preset-typescript":"^7.8.3","@babel/register":"^7.8.6","@babel/runtime":"^7.8.7","@babel/runtime-corejs3":"^7.8.7","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.3","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.6.0","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.9.0","node-sass":"^4.13.1","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.2","slash":"^3.0.0","terser-webpack-plugin":"^2.3.5","unionfs":"^4.3.2","urlsafe-base64":"^1.0.0","webpack":"^4.42.0","webpack-dev-server":"^3.10.3","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-commonjs":"^11.0.2","@rollup/plugin-node-resolve":"^7.1.1","@types/cheerio":"^0.22.16","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.1.0","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.9.1","@types/node":"^13.7.7","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.23","@types/react-dom":"^16.9.5","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.7","@types/webpack-dev-server":"^3.10.0","@types/webpack-merge":"^4.1.5","cross-env":"^7.0.0","react":"^16.13.0","react-dom":"^16.13.0","rimraf":"^3.0.2","rollup":"^1.32.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-terser":"^5.2.0","typescript":"^3.8.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"e298079b61882d243709a71fd87bca8f840b3201","readme":"## Overview\n\n- Static site generator by using React SSR (Server Side Rendering)\n- Developer Experience\n  - Dynamic `Head` component for better SEO\n  - HMR (Hot Module Replacement) when `process.env.NODE_ENV !== 'production'`\n  - Automatically reflect to the browser as soon as you save the scripts and even if styles\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/static react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"static\",\n    \"build\": \"static build\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ]\n}\n```\n\n**`static.config.js`**:\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n  },\n};\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index() {\n  return <p>Hello Static Site</p>;\n}\n```\n\nFinally,\n\n- run `npm run dev` and you'll see `Hello Static Site` in your browser.\n- run `npm run build` and you'll see the static files in the dist directory.\n\nA working examples are here:\n\n- [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n- [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n- [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n\n## Configuration (`static.config.js`)\n\nHere is the default `static.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: 'dist',\n  viewsDir: 'views',\n  port: 3000,\n  routes: {},\n  publicPaths: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `static.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `static.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `static.config.js#distDir`\n\nThe place where `react-ssr` generates static files. (default: `dist`)\n\n```js\nmodule.exports = {\n  distDir: 'out',\n};\n```\n\n### `static.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\n```js\nmodule.exports = {\n  viewsDir: 'pages',\n};\n```\n\n### `static.config.js#port`\n\nThe port of the development server. (default: `3000`)\n\n```js\nmodule.exports = {\n  port: 4000,\n};\n```\n\n### `static.config.js#routes`\n\nThe key is the route, and the value is the path from the views directory.\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n    '/login': 'auth/login',\n  },\n};\n```\n\n### `static.config.js#publicPaths`\n\nThe place where we put static files like images.\n\n```js\nmodule.exports = {\n  publicPaths: [\n    'public',\n  ],\n};\n```\n\n### `static.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = () => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/static';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.20.2-alpha.9","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-SkVt1iNhMME62TMMnXPd78GrJbRmVl2G2KsvMePD0Min4Zv6q7nWaJ+e/kPx8QQGltO1/ZW5gjGTZbKrU3wQPw==","shasum":"d6bcca78d73080221791e1d3ce89a7760aa07d00","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.20.2-alpha.9.tgz","fileCount":39,"unpackedSize":240180,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaTs0CRA9TVsSAnZWagAAlw8P/j/Gal6EhhQEBuBFxCIq\n4miKLmYLujjTn7V6PXXEUeSNc1/xvuJFerLrlU3/aTu5q1+QBJa7xoHpXF3f\n1IO44ESfBFpJ3E20piw96PERmK4KP9GEayuJ5XfidorEgHknG6XRBiewQsaz\nx/vZz8xDSu/7rO+kpeWT+qFF8aWEOniPlSmy0Ff5LyVx5B3vVZF2rDCz1MaI\nH4RBW1lZSVg+goIuhsg7j/eVvyIltzcgwQWNCLXZXnK3+cApa/3emQTzkWlb\nASPLvFtyYJFyRKMQZLcda0A0kyPwOo5cbhq+qPnt2WRlSLMl6KOfW5JCUBvf\nbKtLWYJ1fWbvdxLiHf3eCQ44Y2laWTMe1iocSpes+jTOX5BEbl7aqdLIDRK1\nqoG9xmDtpUWbEOKYlztXYvRznjlFzN+0fNLijMe7ZY136vkG9s3vgXVmD0C2\nBSJW8CddZGg4d706Huq3fqMdwdP61iXu087w76TNYxFpby/MbbJfwgS4R3CK\nsay8lps6sbL7FrJI8GQ7uZKXyf3JCXpB/3jBOxXymvIAE+8YSLv3UbTrSK1n\n3VjasKNxBXzvigrplqo9NhtVjSk/xeq98CCs5TJD7cg1KrfmhmDFa7gAvBjZ\nxHcwDSrhQ+E4xM7gd+r3AHvTJHOkqbqnlNXaiNn7Un1LEqbklBnSg2adgvRR\n/z9g\r\n=TBXV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD5qipXwjx76OIpM5GUklkPrTHb7WBqyD4FQM3h8Dg/5QIhAIcIaHDG7/02PdL8mjSyRHgkp1qUex7mwZ6ylWEAR7ts"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.20.2-alpha.9_1583954740489_0.7541536634853925"},"_hasShrinkwrap":false},"0.20.2-alpha.10":{"name":"@react-ssr/static","version":"0.20.2-alpha.10","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.8.7","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.8.3","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.7","@babel/preset-react":"^7.8.3","@babel/preset-typescript":"^7.8.3","@babel/register":"^7.8.6","@babel/runtime":"^7.8.7","@babel/runtime-corejs3":"^7.8.7","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.3","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.6.0","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.9.0","node-sass":"^4.13.1","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.2","slash":"^3.0.0","terser-webpack-plugin":"^2.3.5","unionfs":"^4.3.2","urlsafe-base64":"^1.0.0","webpack":"^4.42.0","webpack-dev-server":"^3.10.3","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-commonjs":"^11.0.2","@rollup/plugin-node-resolve":"^7.1.1","@types/cheerio":"^0.22.16","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.1.0","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.9.1","@types/node":"^13.7.7","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.23","@types/react-dom":"^16.9.5","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.7","@types/webpack-dev-server":"^3.10.0","@types/webpack-merge":"^4.1.5","cross-env":"^7.0.0","react":"^16.13.0","react-dom":"^16.13.0","rimraf":"^3.0.2","rollup":"^1.32.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-terser":"^5.2.0","typescript":"^3.8.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"65264a0c6af3d21a1665afd0e0f51efa24fb1ccf","readme":"## Overview\n\n- Static site generator by using React SSR (Server Side Rendering)\n- Developer Experience\n  - Dynamic `Head` component for better SEO\n  - HMR (Hot Module Replacement) when `process.env.NODE_ENV !== 'production'`\n  - Automatically reflect to the browser as soon as you save the scripts and even if styles\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/static react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"static\",\n    \"build\": \"static build\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ]\n}\n```\n\n**`static.config.js`**:\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n  },\n};\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index() {\n  return <p>Hello Static Site</p>;\n}\n```\n\nFinally,\n\n- run `npm run dev` and you'll see `Hello Static Site` in your browser.\n- run `npm run build` and you'll see the static files in the dist directory.\n\nA working examples are here:\n\n- [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n- [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n- [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n\n## Configuration (`static.config.js`)\n\nHere is the default `static.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: 'dist',\n  viewsDir: 'views',\n  port: 3000,\n  routes: {},\n  publicPaths: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `static.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `static.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `static.config.js#distDir`\n\nThe place where `react-ssr` generates static files. (default: `dist`)\n\n```js\nmodule.exports = {\n  distDir: 'out',\n};\n```\n\n### `static.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\n```js\nmodule.exports = {\n  viewsDir: 'pages',\n};\n```\n\n### `static.config.js#port`\n\nThe port of the development server. (default: `3000`)\n\n```js\nmodule.exports = {\n  port: 4000,\n};\n```\n\n### `static.config.js#routes`\n\nThe key is the route, and the value is the path from the views directory.\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n    '/login': 'auth/login',\n  },\n};\n```\n\n### `static.config.js#publicPaths`\n\nThe place where we put static files like images.\n\n```js\nmodule.exports = {\n  publicPaths: [\n    'public',\n  ],\n};\n```\n\n### `static.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = () => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/static';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.20.2-alpha.10","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-IBfzZWzTc/GOxcWb/5gReBt4ALkfVO9607mHIrB/A83fsW7OIbsAB7gls2Tu7gEuvkR+5fPQnvP42XDtoalbTQ==","shasum":"85499479e02f35470bc5cd6aa27a55e7e8ccba7d","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.20.2-alpha.10.tgz","fileCount":39,"unpackedSize":239901,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaTw3CRA9TVsSAnZWagAAuncP/Ri4kGzrhmxEseK/OTJb\nJMJsNh3H/dGR6LFJURA1RAtYQHe2ipejFYcJdC9gF4hWBYkKfqJQUuJZe9PQ\nIhZOecczfBwzL5roiKJOA4sc4MJB/ecF109X98XcS17BhUQRmRDLOZ7VHf44\nd75irSYbrXCkb0jHxNVTIYpyLQGITUNXkXLStYqXSyRBBO4SDKxmC2Ml9pg+\nK5uaw4zRpfe5Ea6YYem2EASybT+JbAb68RlyFtCrWDgh5F0xEje31r9N1s8Y\nC4wI3DABAfPVrQiww1+xIUVHxYRAEqaD7bmew/GwhK/Ml45+U03e3qZtkmZQ\nHO5JWcywmXQZx1A131N7r8ZJ5KDQtQyYIVy5/bCYYC4xs6D/lkswEa4EVbu1\nh0pZAxMmZP2GpHFF2WIeM8eONHw00qiQXB9lzxgvNwsN+L1aABLYZiZB7dOk\nzA2YE6hw/x3WDlUsYSM2n3aVDv7bWXXswZXAkiJ3dmAwioFAlD0WXQnwuABw\n1HqgK03McnNybUTFE1E7oZSIMwPXJA/I/YkDajws7wq6Jsp6cYrkaPUTxWc+\nYoCI2uR8/WkMsjKEhhyWx7CS0aVzNOm/zem4jnQFTw+ylzFHhxhok4UGhkV8\nXHrhG60a7p6CgdGqtGlxdyBJea02txhfROdKp6nwRvMyuQrSNvsyVtQ5f8SL\nxql2\r\n=w+V4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDGWgnGMhCPOk0gEipYZztRx8Mx7NfA/U+fYe/GnL38zQIhALQwVBpYgICvRN4DUS1No1sSXnP4+cPthAUMKAZtE0MM"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.20.2-alpha.10_1583954998927_0.7116157490879054"},"_hasShrinkwrap":false},"0.20.2-alpha.11":{"name":"@react-ssr/static","version":"0.20.2-alpha.11","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.8.7","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.8.3","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.7","@babel/preset-react":"^7.8.3","@babel/preset-typescript":"^7.8.3","@babel/register":"^7.8.6","@babel/runtime":"^7.8.7","@babel/runtime-corejs3":"^7.8.7","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.3","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.6.0","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.9.0","node-sass":"^4.13.1","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.2","slash":"^3.0.0","terser-webpack-plugin":"^2.3.5","unionfs":"^4.3.2","urlsafe-base64":"^1.0.0","webpack":"^4.42.0","webpack-dev-server":"^3.10.3","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-commonjs":"^11.0.2","@rollup/plugin-node-resolve":"^7.1.1","@types/cheerio":"^0.22.16","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.1.0","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.9.1","@types/node":"^13.7.7","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.23","@types/react-dom":"^16.9.5","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.7","@types/webpack-dev-server":"^3.10.0","@types/webpack-merge":"^4.1.5","cross-env":"^7.0.0","react":"^16.13.0","react-dom":"^16.13.0","rimraf":"^3.0.2","rollup":"^1.32.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-terser":"^5.2.0","typescript":"^3.8.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"377a2a530e946281349d1131754ed44f731ac839","readme":"## Overview\n\n- Static site generator by using React SSR (Server Side Rendering)\n- Developer Experience\n  - Dynamic `Head` component for better SEO\n  - HMR (Hot Module Replacement) when `process.env.NODE_ENV !== 'production'`\n  - Automatically reflect to the browser as soon as you save the scripts and even if styles\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/static react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"static\",\n    \"build\": \"static build\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ]\n}\n```\n\n**`static.config.js`**:\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n  },\n};\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index() {\n  return <p>Hello Static Site</p>;\n}\n```\n\nFinally,\n\n- run `npm run dev` and you'll see `Hello Static Site` in your browser.\n- run `npm run build` and you'll see the static files in the dist directory.\n\nA working examples are here:\n\n- [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n- [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n- [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n\n## Configuration (`static.config.js`)\n\nHere is the default `static.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: 'dist',\n  viewsDir: 'views',\n  port: 3000,\n  routes: {},\n  publicPaths: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `static.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `static.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `static.config.js#distDir`\n\nThe place where `react-ssr` generates static files. (default: `dist`)\n\n```js\nmodule.exports = {\n  distDir: 'out',\n};\n```\n\n### `static.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\n```js\nmodule.exports = {\n  viewsDir: 'pages',\n};\n```\n\n### `static.config.js#port`\n\nThe port of the development server. (default: `3000`)\n\n```js\nmodule.exports = {\n  port: 4000,\n};\n```\n\n### `static.config.js#routes`\n\nThe key is the route, and the value is the path from the views directory.\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n    '/login': 'auth/login',\n  },\n};\n```\n\n### `static.config.js#publicPaths`\n\nThe place where we put static files like images.\n\n```js\nmodule.exports = {\n  publicPaths: [\n    'public',\n  ],\n};\n```\n\n### `static.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = () => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/static';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.20.2-alpha.11","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-7N2VBmyzgu291I7+eHvxO6YwLHAyrvF2dcOG8XuPWyXPlxTfdlnixEjog+YEojPy5lr1CE4azLAiCG/4Brtc3A==","shasum":"3a0923cc0c578ee8e3afc32496fed5638a1d123f","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.20.2-alpha.11.tgz","fileCount":39,"unpackedSize":239816,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaTxvCRA9TVsSAnZWagAAJnYQAIv0TtlQVsm1MASeOukE\nO1jjv0DWTvlxcekh3aLMh1JFPM0mXH0A6GayaHihojGzJV8gSzBi0j1GSpxQ\nlIUz9RwFD4cdBxfmoTpzY523CcNeClya4dmgkqt92q2CNIbJbKedp7fb86hF\ncxqRQqRzNHoLywzbdq2ae7PygwXUwNIEQ6/K9MUP2XNDFbQ3/dREqopE/9J9\nkaavWJHKN+epZfgOm1RKaxLHawqA3s+rncI45MhfxZ643Fc+2MfJiu351tTq\ntnyEJP++NV7l+HbL1MPGB56yYhAVbQ9qhXjHKB/q19h9WdF7Jd3W7w1RSAHB\nrhQJYTiBHgTz81CRzomkx3IS5hMHvKeUnbTVDuLzHfoiMH9En1wXfhUEZhMF\nSPLZlU4F70QF/vB9OYwtHns1C8rim9h1AjWmeN75tNUrg+x00C1M25+Riiw/\nU4L7RNAPL+Z1Q7+72EbSxQYEhEny3yyvGFVwYW9B4N17J4CJlsE5Kuu42rLw\n9my6e4XKPm4NWwXqnpxnro5dkCgiM2dyFjVLvF6/7HW33oYQi0PmYpORpZnW\nhNKW19PkPZ2ovlMhdpUsLnTEKjWxabaeB2ICDsIqupm7rXT9vxeHN4kn3BQ9\njL9crRdW6Rp3V7xwAU2OgVSEz/NQYhcSB1+lyy/cXlTTdfaA069MUX9f5sYS\noAN0\r\n=QdiO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDMg1+KSuxfY5EwosJ+XtZhHN50X/TYefnpJHmoRezd+AiEAo/UwfDD8uVpzdbTc3rX0PNczgpTm3ukMwf0HytcZ23s="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.20.2-alpha.11_1583955055372_0.22897045190275578"},"_hasShrinkwrap":false},"0.20.2-alpha.12":{"name":"@react-ssr/static","version":"0.20.2-alpha.12","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.8.7","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.8.3","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.7","@babel/preset-react":"^7.8.3","@babel/preset-typescript":"^7.8.3","@babel/register":"^7.8.6","@babel/runtime":"^7.8.7","@babel/runtime-corejs3":"^7.8.7","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.3","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.6.0","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.9.0","node-sass":"^4.13.1","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.2","slash":"^3.0.0","terser-webpack-plugin":"^2.3.5","unionfs":"^4.3.2","urlsafe-base64":"^1.0.0","webpack":"^4.42.0","webpack-dev-server":"^3.10.3","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-commonjs":"^11.0.2","@rollup/plugin-node-resolve":"^7.1.1","@types/cheerio":"^0.22.16","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.1.0","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.9.1","@types/node":"^13.7.7","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.23","@types/react-dom":"^16.9.5","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.7","@types/webpack-dev-server":"^3.10.0","@types/webpack-merge":"^4.1.5","cross-env":"^7.0.0","react":"^16.13.0","react-dom":"^16.13.0","rimraf":"^3.0.2","rollup":"^1.32.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-terser":"^5.2.0","typescript":"^3.8.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"3ba696ea03ce76986746a99ab4cf6b5008e8dc4e","readme":"## Overview\n\n- Static site generator by using React SSR (Server Side Rendering)\n- Developer Experience\n  - Dynamic `Head` component for better SEO\n  - HMR (Hot Module Replacement) when `process.env.NODE_ENV !== 'production'`\n  - Automatically reflect to the browser as soon as you save the scripts and even if styles\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/static react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"static\",\n    \"build\": \"static build\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ]\n}\n```\n\n**`static.config.js`**:\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n  },\n};\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index() {\n  return <p>Hello Static Site</p>;\n}\n```\n\nFinally,\n\n- run `npm run dev` and you'll see `Hello Static Site` in your browser.\n- run `npm run build` and you'll see the static files in the dist directory.\n\nA working examples are here:\n\n- [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n- [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n- [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n\n## Configuration (`static.config.js`)\n\nHere is the default `static.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: 'dist',\n  viewsDir: 'views',\n  port: 3000,\n  routes: {},\n  publicPaths: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `static.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `static.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `static.config.js#distDir`\n\nThe place where `react-ssr` generates static files. (default: `dist`)\n\n```js\nmodule.exports = {\n  distDir: 'out',\n};\n```\n\n### `static.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\n```js\nmodule.exports = {\n  viewsDir: 'pages',\n};\n```\n\n### `static.config.js#port`\n\nThe port of the development server. (default: `3000`)\n\n```js\nmodule.exports = {\n  port: 4000,\n};\n```\n\n### `static.config.js#routes`\n\nThe key is the route, and the value is the path from the views directory.\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n    '/login': 'auth/login',\n  },\n};\n```\n\n### `static.config.js#publicPaths`\n\nThe place where we put static files like images.\n\n```js\nmodule.exports = {\n  publicPaths: [\n    'public',\n  ],\n};\n```\n\n### `static.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = () => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/static';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.20.2-alpha.12","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-jlL8CbXROFCDGfqXExOgv+tJkcmTJ/jlGz5+sf+QR1jq/4ZfPAZezOhiI93ghiAJc0lj2QovofxrggSR8ztYyQ==","shasum":"d6840d36695fada3edceb8f1af1e075451a3954f","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.20.2-alpha.12.tgz","fileCount":39,"unpackedSize":239834,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaT0nCRA9TVsSAnZWagAAt+QP/ip3JaULy24VAZuPejk1\nqf4+bcTM96kKiY/SKjHencD0SIV68lVb+kJX27CY+gVthD27c+K+VVFoaTuH\noSC0qqi2Yy6s6xaViuAuWApaYK/tq3nlInSgPzupFoM/3Zqa6vWARAumtvKm\n7+dIMGRQxwQcxClyTTPMo2gTrHSmc5nV86jLa5bPwmig+DPUNmTbm+FiV/mA\nj4dkn6fu3z7RW5GqpFiLOUUosJRsqgaxxv4ERwhFO3DH+rkcH8Pid6NVP6vM\nZwxEwXVRUgYF4d7rIC/pfoNSL0O5EDwcvNFiSNX4JJm/JPuT2hSuu1/QWr18\n4OEE8yCHzQSJRf7Z6su3OVA/8BRLyXw34PcIrKXTG/8r031WD1id6nOoogys\nR2S4fQNJt7piDeYrxAdb2ZdTigtmTuEMW/fsyIJwE8TMB4mtE2r1d9Msqd6G\nxJ6R5t5B3+WA6hQu9QmrQHUkuwnZ/YMEJEUtRtU9lVtapYmDzHlmNCcbJj08\nGq2lHykXnGBCXG2jzHSM5WOgi6AKEFozJK8bNm32qiXtMRBTLZ6yKGoWF551\nEks91EjPGoVv176qMvSB7Xltk9QCPlMUGu+fZq2ZasRnmUxYOzeqYzxkOdpg\ncbsIPdcP4BwINFv87vDsg918Z0PQush0F/u/Ucf3/w8MHEjcWsxLzUTl6/Uu\nCxYr\r\n=D4Km\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD+8KRbC2piF16eCYSkg8A0+VmmAIfHZwj++MY+oYXhKAIhAOu4ly6sd66PkoTYp+VomHK0RDHbRA67r5RPcnBtuMAv"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.20.2-alpha.12_1583955239245_0.012463765050744646"},"_hasShrinkwrap":false},"0.20.2-alpha.13":{"name":"@react-ssr/static","version":"0.20.2-alpha.13","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.8.7","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.8.3","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.7","@babel/preset-react":"^7.8.3","@babel/preset-typescript":"^7.8.3","@babel/register":"^7.8.6","@babel/runtime":"^7.8.7","@babel/runtime-corejs3":"^7.8.7","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.3","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.6.0","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.9.0","node-sass":"^4.13.1","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.2","slash":"^3.0.0","terser-webpack-plugin":"^2.3.5","unionfs":"^4.3.2","urlsafe-base64":"^1.0.0","webpack":"^4.42.0","webpack-dev-server":"^3.10.3","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-commonjs":"^11.0.2","@rollup/plugin-node-resolve":"^7.1.1","@types/cheerio":"^0.22.16","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.1.0","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.9.1","@types/node":"^13.7.7","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.23","@types/react-dom":"^16.9.5","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.7","@types/webpack-dev-server":"^3.10.0","@types/webpack-merge":"^4.1.5","cross-env":"^7.0.0","react":"^16.13.0","react-dom":"^16.13.0","rimraf":"^3.0.2","rollup":"^1.32.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-terser":"^5.2.0","typescript":"^3.8.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"fef0da9aeb74dc6c1537391c45bc1a02ef8497b8","readme":"## Overview\n\n- Static site generator by using React SSR (Server Side Rendering)\n- Developer Experience\n  - Dynamic `Head` component for better SEO\n  - HMR (Hot Module Replacement) when `process.env.NODE_ENV !== 'production'`\n  - Automatically reflect to the browser as soon as you save the scripts and even if styles\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/static react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"static\",\n    \"build\": \"static build\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ]\n}\n```\n\n**`static.config.js`**:\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n  },\n};\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index() {\n  return <p>Hello Static Site</p>;\n}\n```\n\nFinally,\n\n- run `npm run dev` and you'll see `Hello Static Site` in your browser.\n- run `npm run build` and you'll see the static files in the dist directory.\n\nA working examples are here:\n\n- [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n- [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n- [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n\n## Configuration (`static.config.js`)\n\nHere is the default `static.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: 'dist',\n  viewsDir: 'views',\n  port: 3000,\n  routes: {},\n  publicPaths: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `static.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `static.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `static.config.js#distDir`\n\nThe place where `react-ssr` generates static files. (default: `dist`)\n\n```js\nmodule.exports = {\n  distDir: 'out',\n};\n```\n\n### `static.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\n```js\nmodule.exports = {\n  viewsDir: 'pages',\n};\n```\n\n### `static.config.js#port`\n\nThe port of the development server. (default: `3000`)\n\n```js\nmodule.exports = {\n  port: 4000,\n};\n```\n\n### `static.config.js#routes`\n\nThe key is the route, and the value is the path from the views directory.\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n    '/login': 'auth/login',\n  },\n};\n```\n\n### `static.config.js#publicPaths`\n\nThe place where we put static files like images.\n\n```js\nmodule.exports = {\n  publicPaths: [\n    'public',\n  ],\n};\n```\n\n### `static.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = () => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/static';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.20.2-alpha.13","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-wcBujisIxyxz/ywEmAhfgUsOV7bdJyk+WODrkUEn095KZ7YhluwitpRJtD1nHDGrMM/0Q9i1XkNvqvMP7xb7Dg==","shasum":"a49d423c2915f34cc61d207c04c3954dc47f771b","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.20.2-alpha.13.tgz","fileCount":39,"unpackedSize":239864,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaT3VCRA9TVsSAnZWagAAPHsP/RhF18lCLBcDL90yysVC\nFck9Dy3UObnallYy+veZato7y2zNTi0sdld9BQFw0mo1VkXQTRNQNGkcK2pk\n2mQkaKFXr8GsDOyCndKtUZkaqlcQn0u3yZUMYFC6Iiac61x/OYh/MKlGJYMB\nIgL0vot7u+oENLm47jVGtJbWN390GuXUHuxA0e3PhM3dyyOvikyV4Cjbp+BK\nlDDWDUO3vX5UK8de0X+320kkiaTaqjbNgCXCQX4f4VGFrIsfL0upO7lUJUn+\n/ig6vnCh0lgNF44TNyiqldw8yIlK03uVLF12PmHgyAzAE9g/ZxTk56lmTI/u\nF66yBWi2L4H+fxIMPwoNMiXlYl3B8We0qVEBYOUGR+G2ACyhH6dnxahq1yBY\nv+M7dvJ2J9PAup/2/Zl68RKHvmlw/gR+QIgDFG9ZNbDhyf469l7EfkcikgkW\nq1rwo6tGBmjmTtMJwisgVTX/7xdhOA9rgXlr1D4SwC98ur4uKz8jV/zjmBup\nVL7IC+NNuG87uX8g5/eXuqOmqVKw4FEfO+5JvTz4sXgje7wProYEcuh7t8Oc\nUw+a7kyw1G4bLrZdIw17Vk7HhaGQNHoxDuCVWGWVJmd3YWR3Pj7q4cWyr3gy\ne26gx/MXqh/ot9lqoIu1jBJVbEqKqMOrfWyz/nbNhHmYIYZIgduBQfYYC/qo\nPiIE\r\n=ta+Z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDAwmgHk0eb9T4rzkggKQj/EqVnPHwgMKH4jZGaty/TBQIhAO3NFf/b3a+CbustQOUiUy4NSndqfhHLrHZxByksf88/"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.20.2-alpha.13_1583955413012_0.4779265397395118"},"_hasShrinkwrap":false},"0.20.2-alpha.14":{"name":"@react-ssr/static","version":"0.20.2-alpha.14","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.8.7","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.8.3","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.7","@babel/preset-react":"^7.8.3","@babel/preset-typescript":"^7.8.3","@babel/register":"^7.8.6","@babel/runtime":"^7.8.7","@babel/runtime-corejs3":"^7.8.7","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.3","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.6.0","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.9.0","node-sass":"^4.13.1","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.2","slash":"^3.0.0","terser-webpack-plugin":"^2.3.5","unionfs":"^4.3.2","urlsafe-base64":"^1.0.0","webpack":"^4.42.0","webpack-dev-server":"^3.10.3","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-commonjs":"^11.0.2","@rollup/plugin-node-resolve":"^7.1.1","@types/cheerio":"^0.22.16","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.1.0","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.9.1","@types/node":"^13.7.7","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.23","@types/react-dom":"^16.9.5","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.7","@types/webpack-dev-server":"^3.10.0","@types/webpack-merge":"^4.1.5","cross-env":"^7.0.0","react":"^16.13.0","react-dom":"^16.13.0","rimraf":"^3.0.2","rollup":"^1.32.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-terser":"^5.2.0","typescript":"^3.8.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"0d8a9c7758f28c590e7252114afeb353de0fe93b","readme":"## Overview\n\n- Static site generator by using React SSR (Server Side Rendering)\n- Developer Experience\n  - Dynamic `Head` component for better SEO\n  - HMR (Hot Module Replacement) when `process.env.NODE_ENV !== 'production'`\n  - Automatically reflect to the browser as soon as you save the scripts and even if styles\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/static react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"static\",\n    \"build\": \"static build\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ]\n}\n```\n\n**`static.config.js`**:\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n  },\n};\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index() {\n  return <p>Hello Static Site</p>;\n}\n```\n\nFinally,\n\n- run `npm run dev` and you'll see `Hello Static Site` in your browser.\n- run `npm run build` and you'll see the static files in the dist directory.\n\nA working examples are here:\n\n- [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n- [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n- [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n\n## Configuration (`static.config.js`)\n\nHere is the default `static.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: 'dist',\n  viewsDir: 'views',\n  port: 3000,\n  routes: {},\n  publicPaths: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `static.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `static.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `static.config.js#distDir`\n\nThe place where `react-ssr` generates static files. (default: `dist`)\n\n```js\nmodule.exports = {\n  distDir: 'out',\n};\n```\n\n### `static.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\n```js\nmodule.exports = {\n  viewsDir: 'pages',\n};\n```\n\n### `static.config.js#port`\n\nThe port of the development server. (default: `3000`)\n\n```js\nmodule.exports = {\n  port: 4000,\n};\n```\n\n### `static.config.js#routes`\n\nThe key is the route, and the value is the path from the views directory.\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n    '/login': 'auth/login',\n  },\n};\n```\n\n### `static.config.js#publicPaths`\n\nThe place where we put static files like images.\n\n```js\nmodule.exports = {\n  publicPaths: [\n    'public',\n  ],\n};\n```\n\n### `static.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = () => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/static';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.20.2-alpha.14","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-droDsh7xiJcqQLlKYRQ+rqCerqtgMc2jo5uHOGaj67PKLQqH2WNc4Ic9UCU3ktrFRtKHKEE0Qjj09mBHyRRYKQ==","shasum":"e9e3da3a2b10afc287363b76b0ccdb943f4274e2","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.20.2-alpha.14.tgz","fileCount":35,"unpackedSize":234493,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaT5cCRA9TVsSAnZWagAA2dEP+QHlxfYxU7TlREF3osOO\nPPavz7/AT5l5uN5fx+TMSmkCCrfVkhkl7o4Wm99p38FAOJZCS1bNM03uLprL\nWI4Rwc62kx7Q+IFdKKFQAX9saIQaGm2PCqrSNhEweOuEgxnbd7tUQAArXl4I\ni2txx3FMCQlAV18UpYaFDlfGzyL5D67BG08jEme3AI+RkKPOmXdAzxs12Khg\nzZ9LOUM/nNpuCdtzouXOC/XfCKbCnlyoU6ZEMcxrA/ZBO9qbETAJkgcWkejD\nC0FZk9K8lq6vqi+VtfAUE+RqXBw036JUXoZ9iACYg+RqFm7VFOAIS/HB0vCw\nU/iVooWQz7vNI2SYHSBvQSuSrcdMn3+obiTuFER/VOuUviG0peiavGN0hYmd\nzOrnC2f3WnsLfp7sBUN8c3FXrMemFBfKSkQywva7M4tLwnbSUv103kzch9bS\nbKTf6tqyWs1/dttWdrFzLUGvAnyR2OMH4BW5zCI4SNSdJlt/cEMDUcf6oAzA\nf7xNSF6vdoRJNnLsxvYOh+TnbXkYI45hvgfHUmJENQVbXmb3wPK8ucaOeRyB\nOIUAhwC3OSpwrM0Oiu6g4m5emvVWqelgx4CjbWDOjpk05zFoBQ8+akmWM0tq\n7hqpCbWUkYPboO8x3HFJZQr+5YNW3GDzc0GCnePcZ/Z6j12LEKsWSLW4OQUB\nJY1Q\r\n=oyqe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH7fv1JsKwxWoyZGz2SmcG9fQv8ojJl7yMeRDEAlcWA7AiA8488UNsu6RjPwsaW4bh0qJNdApYb0VSVvGhPFKReEWA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.20.2-alpha.14_1583955548220_0.1031670758690677"},"_hasShrinkwrap":false},"0.20.2-alpha.15":{"name":"@react-ssr/static","version":"0.20.2-alpha.15","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.8.7","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.8.3","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.7","@babel/preset-react":"^7.8.3","@babel/preset-typescript":"^7.8.3","@babel/register":"^7.8.6","@babel/runtime":"^7.8.7","@babel/runtime-corejs3":"^7.8.7","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.3","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.6.0","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.9.0","node-sass":"^4.13.1","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.2","slash":"^3.0.0","terser-webpack-plugin":"^2.3.5","unionfs":"^4.3.2","urlsafe-base64":"^1.0.0","webpack":"^4.42.0","webpack-dev-server":"^3.10.3","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-commonjs":"^11.0.2","@rollup/plugin-node-resolve":"^7.1.1","@types/cheerio":"^0.22.16","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.1.0","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.9.1","@types/node":"^13.7.7","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.23","@types/react-dom":"^16.9.5","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.7","@types/webpack-dev-server":"^3.10.0","@types/webpack-merge":"^4.1.5","cross-env":"^7.0.0","react":"^16.13.0","react-dom":"^16.13.0","rimraf":"^3.0.2","rollup":"^1.32.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-terser":"^5.2.0","typescript":"^3.8.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"ffe1f8902dc98a26bd1d3abc009896a3f640513c","readme":"## Overview\n\n- Static site generator by using React SSR (Server Side Rendering)\n- Developer Experience\n  - Dynamic `Head` component for better SEO\n  - HMR (Hot Module Replacement) when `process.env.NODE_ENV !== 'production'`\n  - Automatically reflect to the browser as soon as you save the scripts and even if styles\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/static react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"static\",\n    \"build\": \"static build\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ]\n}\n```\n\n**`static.config.js`**:\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n  },\n};\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index() {\n  return <p>Hello Static Site</p>;\n}\n```\n\nFinally,\n\n- run `npm run dev` and you'll see `Hello Static Site` in your browser.\n- run `npm run build` and you'll see the static files in the dist directory.\n\nA working examples are here:\n\n- [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n- [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n- [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n\n## Configuration (`static.config.js`)\n\nHere is the default `static.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: 'dist',\n  viewsDir: 'views',\n  port: 3000,\n  routes: {},\n  publicPaths: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `static.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `static.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `static.config.js#distDir`\n\nThe place where `react-ssr` generates static files. (default: `dist`)\n\n```js\nmodule.exports = {\n  distDir: 'out',\n};\n```\n\n### `static.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\n```js\nmodule.exports = {\n  viewsDir: 'pages',\n};\n```\n\n### `static.config.js#port`\n\nThe port of the development server. (default: `3000`)\n\n```js\nmodule.exports = {\n  port: 4000,\n};\n```\n\n### `static.config.js#routes`\n\nThe key is the route, and the value is the path from the views directory.\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n    '/login': 'auth/login',\n  },\n};\n```\n\n### `static.config.js#publicPaths`\n\nThe place where we put static files like images.\n\n```js\nmodule.exports = {\n  publicPaths: [\n    'public',\n  ],\n};\n```\n\n### `static.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = () => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/static';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.20.2-alpha.15","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-jyZRK8favMvh78sgzPr8yLWwt+TQSots3pfX1iG7avGJOlU38vGXjtwWQ6cJ1VrggGQcLE8KsGJZc2MfRhBCSQ==","shasum":"92a6d8f2e5dfd23b98e5c5722f614e1894487be4","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.20.2-alpha.15.tgz","fileCount":39,"unpackedSize":240188,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaT77CRA9TVsSAnZWagAAcvAP/1n/TExs9HithQf/imOP\noCEUxhYo+qzcRBu3+5SFGu+V2wKS2b+sIvLXulezipmyE3bKEPqTV5SxAH69\n40bYEkbCFM5POUxXPbU6ug6AQHAGTmuJA4VO4eG2Xyn1qD+N5/0s11Nks2bv\nEm/wV04/sSpqbUiqBq9Uh+NcJH10bUuuVkZ6+OHUzGeZh+gSyUzVw0Bzwybb\nVYAQZ20hPTQpHkZZOk7izvJ7eJW+0v6k+3RB+zYeJlGfC77LVjdzQJgjzBbZ\nCjAeInf9EeZdBDQmg77Om4byiZ4OLaAUk8/ERKoIa1nKMZfGRq5Zi4c2LiQk\n7f5cqQhfNpQqllps9/IUOj3FD1UJDgRvufo6bA2fDvmAEZmnP+/N/WMh9ECj\nB5L8VOY299cCU15YZT3+JTnQNPikRYgdh+Bq5UJvKGdaKqj6z03YlwHGSUbA\n2Jy5JUYbtTxZ9mT+/oqWk1BgM7WMqBj9Ip9V0AmD6//Mn49tod7TBlHcN1Va\n2t2kWMVRsRYk5j3CEakvPRErGX/inV/ceoAjrbona3NVuJJL9VczMUiLGHiP\nTCJ36j1SL0vWHqh5dE7dPg1M63AlrR+UHAl0NYP+bBYc1aKswyIwMEKiy0lL\nZ7ReTPCGswXt+MZPE88y40BFYhslG6U24YEE+0j+YuY3kzhxcaYm7jaZSsa7\nfKCZ\r\n=pXcZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCwT/YwNl6/gO18apqRbTxnbEop0y+uUx/kgEyDs42FggIhAMvl8AAD4vP9hMBxipK7CumOZpkmsSFIZ4nObQEeQ1Jq"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.20.2-alpha.15_1583955706696_0.8875341810370934"},"_hasShrinkwrap":false},"0.20.2-alpha.16":{"name":"@react-ssr/static","version":"0.20.2-alpha.16","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.8.7","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.8.3","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.7","@babel/preset-react":"^7.8.3","@babel/preset-typescript":"^7.8.3","@babel/register":"^7.8.6","@babel/runtime":"^7.8.7","@babel/runtime-corejs3":"^7.8.7","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.3","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.6.0","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.9.0","node-sass":"^4.13.1","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.2","slash":"^3.0.0","terser-webpack-plugin":"^2.3.5","unionfs":"^4.3.2","urlsafe-base64":"^1.0.0","webpack":"^4.42.0","webpack-dev-server":"^3.10.3","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-commonjs":"^11.0.2","@rollup/plugin-node-resolve":"^7.1.1","@types/cheerio":"^0.22.16","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.1.0","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.9.1","@types/node":"^13.7.7","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.23","@types/react-dom":"^16.9.5","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.7","@types/webpack-dev-server":"^3.10.0","@types/webpack-merge":"^4.1.5","cross-env":"^7.0.0","react":"^16.13.0","react-dom":"^16.13.0","rimraf":"^3.0.2","rollup":"^1.32.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-terser":"^5.2.0","typescript":"^3.8.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"002b38b1014a602f361593d45d136cf5e21c301d","readme":"## Overview\n\n- Static site generator by using React SSR (Server Side Rendering)\n- Developer Experience\n  - Dynamic `Head` component for better SEO\n  - HMR (Hot Module Replacement) when `process.env.NODE_ENV !== 'production'`\n  - Automatically reflect to the browser as soon as you save the scripts and even if styles\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/static react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"static\",\n    \"build\": \"static build\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ]\n}\n```\n\n**`static.config.js`**:\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n  },\n};\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index() {\n  return <p>Hello Static Site</p>;\n}\n```\n\nFinally,\n\n- run `npm run dev` and you'll see `Hello Static Site` in your browser.\n- run `npm run build` and you'll see the static files in the dist directory.\n\nA working examples are here:\n\n- [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n- [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n- [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n\n## Configuration (`static.config.js`)\n\nHere is the default `static.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: 'dist',\n  viewsDir: 'views',\n  port: 3000,\n  routes: {},\n  publicPaths: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `static.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `static.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `static.config.js#distDir`\n\nThe place where `react-ssr` generates static files. (default: `dist`)\n\n```js\nmodule.exports = {\n  distDir: 'out',\n};\n```\n\n### `static.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\n```js\nmodule.exports = {\n  viewsDir: 'pages',\n};\n```\n\n### `static.config.js#port`\n\nThe port of the development server. (default: `3000`)\n\n```js\nmodule.exports = {\n  port: 4000,\n};\n```\n\n### `static.config.js#routes`\n\nThe key is the route, and the value is the path from the views directory.\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n    '/login': 'auth/login',\n  },\n};\n```\n\n### `static.config.js#publicPaths`\n\nThe place where we put static files like images.\n\n```js\nmodule.exports = {\n  publicPaths: [\n    'public',\n  ],\n};\n```\n\n### `static.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = () => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/static';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.20.2-alpha.16","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-Apk5cU0+AlDvmQyh45OhN4BbNjoo8XAx0RuL6We+475c3OW/5YaZGDZ35+XO18WUFw+c9XMhiK/PBsgVDU7hTg==","shasum":"7bd54d676861666cbe921571537107030385a65b","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.20.2-alpha.16.tgz","fileCount":39,"unpackedSize":239908,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaT+TCRA9TVsSAnZWagAAFmYP/38A1910H42b3uWhDOln\nC/+/KQsEW8uDCqrcFrf5OE0zMWItw+i9hjZ1SQAiV2tnM/fGCET9FSdCXs5j\n1URcIQbGH0H7KMAf4KFR0RI0c7hFPMVgDYClVIEtEIL38TOEJyoAGAkgeZ/C\n53HuyDca+g2dLBjpJaHwYMZ01gBxEMpcqWWq2Yi0DDhtkX4dgRPlU4YanWnA\nAZqoZCiJEsQFaQYNggdhY0qs1piRaiQHpHBnhE+LlNFxzOOpntmeV/VgnV0S\nW3KFM22CBxhVKctsx+D7mftXcSLBja0Yrx39wFQQBAIrozorrVdXUHCg2yAC\nkjCKbvccgQODJPbsy2Edufi99gzuuyAFtgyeWQEoGOa0GN7SL7YBOn+il/Nm\nl//LWN0W7xuPcz12KJ0C2OtGEeTSqWdAzz/6vIn1gZRTgomdaJ05h1Rn08WW\nZjlSyL23QlGGUAsHo0nGMCAA3sW25VZ/eB4Hoz06MtLJuarAC7dTCo4jjUKY\njJmgv7icY44OjcLxdcbvByWJafFPTY0206oZeDqOL5V4i0lXaUOi9Wjq6Ml9\n9Auxb2mc2h0tbgFmNtvpT9ADlE74JpV1oNGwQwRNpzXqzUEPzQwbXUCyAmjl\nxj+bl2hAvn8Z4GSU8nZkW1km+NOdDIPeFtBT1s4rO9ltTxw5PZ4UtQC3FCOC\nuMEn\r\n=rVFM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBrfBMMg3rds/S8h5UNtmFBU4XGIQ/XMoPNyVCjBJ7RUAiEAjO1nh96VKzZwrl9O+iuPSRUcKKrncLA1vDLlNpXaoN0="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.20.2-alpha.16_1583955859508_0.6531469998347892"},"_hasShrinkwrap":false},"0.20.2-alpha.17":{"name":"@react-ssr/static","version":"0.20.2-alpha.17","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.8.7","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.8.3","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.7","@babel/preset-react":"^7.8.3","@babel/preset-typescript":"^7.8.3","@babel/register":"^7.8.6","@babel/runtime":"^7.8.7","@babel/runtime-corejs3":"^7.8.7","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.3","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.6.0","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.9.0","node-sass":"^4.13.1","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.2","slash":"^3.0.0","terser-webpack-plugin":"^2.3.5","unionfs":"^4.3.2","urlsafe-base64":"^1.0.0","webpack":"^4.42.0","webpack-dev-server":"^3.10.3","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-commonjs":"^11.0.2","@rollup/plugin-node-resolve":"^7.1.1","@types/cheerio":"^0.22.16","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.1.0","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.9.1","@types/node":"^13.7.7","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.23","@types/react-dom":"^16.9.5","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.7","@types/webpack-dev-server":"^3.10.0","@types/webpack-merge":"^4.1.5","cross-env":"^7.0.0","react":"^16.13.0","react-dom":"^16.13.0","rimraf":"^3.0.2","rollup":"^1.32.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-terser":"^5.2.0","typescript":"^3.8.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"2410990ddc607ebbeb998657e5e4c83c4079bc1e","readme":"## Overview\n\n- Static site generator by using React SSR (Server Side Rendering)\n- Developer Experience\n  - Dynamic `Head` component for better SEO\n  - HMR (Hot Module Replacement) when `process.env.NODE_ENV !== 'production'`\n  - Automatically reflect to the browser as soon as you save the scripts and even if styles\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/static react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"static\",\n    \"build\": \"static build\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ]\n}\n```\n\n**`static.config.js`**:\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n  },\n};\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index() {\n  return <p>Hello Static Site</p>;\n}\n```\n\nFinally,\n\n- run `npm run dev` and you'll see `Hello Static Site` in your browser.\n- run `npm run build` and you'll see the static files in the dist directory.\n\nA working examples are here:\n\n- [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n- [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n- [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n\n## Configuration (`static.config.js`)\n\nHere is the default `static.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: 'dist',\n  viewsDir: 'views',\n  port: 3000,\n  routes: {},\n  publicPaths: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `static.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `static.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `static.config.js#distDir`\n\nThe place where `react-ssr` generates static files. (default: `dist`)\n\n```js\nmodule.exports = {\n  distDir: 'out',\n};\n```\n\n### `static.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\n```js\nmodule.exports = {\n  viewsDir: 'pages',\n};\n```\n\n### `static.config.js#port`\n\nThe port of the development server. (default: `3000`)\n\n```js\nmodule.exports = {\n  port: 4000,\n};\n```\n\n### `static.config.js#routes`\n\nThe key is the route, and the value is the path from the views directory.\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n    '/login': 'auth/login',\n  },\n};\n```\n\n### `static.config.js#publicPaths`\n\nThe place where we put static files like images.\n\n```js\nmodule.exports = {\n  publicPaths: [\n    'public',\n  ],\n};\n```\n\n### `static.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = () => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/static';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.20.2-alpha.17","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-NsFizqmPBp+v198FXVKvaZmlv+bmfjBX3Dy+G+k+8YDY4xoZZCN9RjqDfElIQBS14BU5BtxwHp4eGaIhPBcgVg==","shasum":"ba2ba91235e2d3d618e7842706aae7e0a5a37524","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.20.2-alpha.17.tgz","fileCount":39,"unpackedSize":239484,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaT/3CRA9TVsSAnZWagAAyy4P/3auDm5M7vGwpJupf3Oe\nZjIfDYaEUAR8bMFjLJp2NKQIc8rq6TaktBFKsNyTTIq7FkdxZ+TvYi/ABksV\nxd87H753paZ7LNZOabdnOZswUvtQCuK/MV/+D5DfPxA5zuAbsZb9r9sovSbg\nfJfu4+SlBrHmeM13zomFLqOZFSF7PFUEC33jXBOrLSrWhOUwmIPfFD8dxpB8\nTYDZ0+azXBuC6Y3RSbM+EBWP+ZIYN0lH+763arnsouGBT9Ba5wqjA9gCaw2n\ngBsymQmbzyTAh2ed3DEMu2+HnMqDIhB7+llE07hpMRbJA4f+mWQiCRgs9xDp\nAkl6UJMd0SVclaJDm4Nsr/PJsHKY0FgZCd7/9T8NxEoaEK98V+jKYdRwYGUF\nNDeZgOh0M/79UWtCeg2WLYVv65YX7Ttv4JauLy+KhWgFacu7B2c7mMnQlPax\nW32M8z3wJx9pAtxcf9FAqKNPMC0jW+EoqFNnjLadC9GG059n5i8zi3KGrTBM\nmrnBWZIYMtCX4GRN+B7f4s4Uhe8u0YR/DGwAQpOvLepo7E4h+e3/atB5BVPI\nTuoINeTYYHiahCECDe9Jo6vBjY+Bvhmpb72IdngVcMvTpj1Ya+J2u9stctx8\nhASo77KrJlkX/ynwV6CLUBFkFFi9c6+KfrlzKFFF/JOuNoy7NPinrN7wEzhQ\nP4xC\r\n=ze9X\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICczacYfZHVB9eTv+ckLICqXyMPbLSl+/2EB6LEfWpTQAiEA2iRBCakl2h8ANyWOOLX0zeIO8fIL9gPKXLMXkLvWb4o="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.20.2-alpha.17_1583955958675_0.11831299108859183"},"_hasShrinkwrap":false},"0.20.2-alpha.18":{"name":"@react-ssr/static","version":"0.20.2-alpha.18","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.8.7","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.8.3","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.7","@babel/preset-react":"^7.8.3","@babel/preset-typescript":"^7.8.3","@babel/register":"^7.8.6","@babel/runtime":"^7.8.7","@babel/runtime-corejs3":"^7.8.7","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.3","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.6.0","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.9.0","node-sass":"^4.13.1","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.2","slash":"^3.0.0","terser-webpack-plugin":"^2.3.5","unionfs":"^4.3.2","urlsafe-base64":"^1.0.0","webpack":"^4.42.0","webpack-dev-server":"^3.10.3","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-commonjs":"^11.0.2","@rollup/plugin-node-resolve":"^7.1.1","@types/cheerio":"^0.22.16","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.1.0","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.9.1","@types/node":"^13.7.7","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.23","@types/react-dom":"^16.9.5","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.7","@types/webpack-dev-server":"^3.10.0","@types/webpack-merge":"^4.1.5","cross-env":"^7.0.0","react":"^16.13.0","react-dom":"^16.13.0","rimraf":"^3.0.2","rollup":"^1.32.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-terser":"^5.2.0","typescript":"^3.8.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"c342d89f42d58c377b5a22d54ae04a93b3b2061f","readme":"## Overview\n\n- Static site generator by using React SSR (Server Side Rendering)\n- Developer Experience\n  - Dynamic `Head` component for better SEO\n  - HMR (Hot Module Replacement) when `process.env.NODE_ENV !== 'production'`\n  - Automatically reflect to the browser as soon as you save the scripts and even if styles\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/static react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"static\",\n    \"build\": \"static build\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ]\n}\n```\n\n**`static.config.js`**:\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n  },\n};\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index() {\n  return <p>Hello Static Site</p>;\n}\n```\n\nFinally,\n\n- run `npm run dev` and you'll see `Hello Static Site` in your browser.\n- run `npm run build` and you'll see the static files in the dist directory.\n\nA working examples are here:\n\n- [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n- [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n- [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n\n## Configuration (`static.config.js`)\n\nHere is the default `static.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: 'dist',\n  viewsDir: 'views',\n  port: 3000,\n  routes: {},\n  publicPaths: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `static.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `static.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `static.config.js#distDir`\n\nThe place where `react-ssr` generates static files. (default: `dist`)\n\n```js\nmodule.exports = {\n  distDir: 'out',\n};\n```\n\n### `static.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\n```js\nmodule.exports = {\n  viewsDir: 'pages',\n};\n```\n\n### `static.config.js#port`\n\nThe port of the development server. (default: `3000`)\n\n```js\nmodule.exports = {\n  port: 4000,\n};\n```\n\n### `static.config.js#routes`\n\nThe key is the route, and the value is the path from the views directory.\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n    '/login': 'auth/login',\n  },\n};\n```\n\n### `static.config.js#publicPaths`\n\nThe place where we put static files like images.\n\n```js\nmodule.exports = {\n  publicPaths: [\n    'public',\n  ],\n};\n```\n\n### `static.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = () => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/static';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.20.2-alpha.18","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-STKVqgulLCGkeiUKsfZbdq5hCMu5oFfQvLpoERbWTaAa/HWpEgW8cdK6g03LGKw9M8VNyNMCG+dISEWnwGhjMg==","shasum":"c97728c9954bbabec9cf6b567b7578c70c344a0e","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.20.2-alpha.18.tgz","fileCount":39,"unpackedSize":239531,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaUCvCRA9TVsSAnZWagAAbR0P/RAezPxUDYezxxm5PWLn\nL1TwWa8erxX08M9su2MoUVuf2RG2Ruq4uu83km0d1LGjkUUzXPqq847i7rCt\nF3cfbegkak1nneHFYmvitizENCG+8GJcr5BwEGjWcLxvJ3DekQlHKe/3VDUe\nO6FL7YP+gMExWvfHx/E9cOf2Icf3FCIROUsLwSKTRbZ2Fbh4nhljgpGagmvt\nGxLD/JkgW8nGogHQSj2EWTO5jKoYdHujZxz3Syz0pasQKISurIhbGKOW0BY+\nps+XwCfDyJWqgPwlXe6i7fMDPJBbd8F1TKHSs1wijXFFdrZzw9M8Vcv3QR+u\nni0A5KW5U9DsFqRcopBFjecBGB9tzU2PFN5D3G3jz7UH7ulhNdBPsYESO5HN\nqQlY1QaDqcd3AOMA6GV5MorbJFrp9sxRhIGBZSCG6+NWrbDj4GAilFNUWg1m\ny79bmqsqSuH+4wBHJAfpIJCOlGfh+IsSZn4j0R+fbQrkDw0mViyn2sGT62cO\nZ7ZLR3OG7PD7fsPR/1T5dhR0bKfZUdGYmBu+qfP0oTfKaXxR0lotWpWYW9a0\n8jraeA5woAGstrNA0B+qjFBqq42RzF4AqYJjqtTE7jW8P+Jfwa/34nKAkULD\nR5TcsUBZEvMnb9K36Oc1V8SigRbB2QQv+P/pG9uxNF+cEeNzn/BfP76nEY5d\nUzlT\r\n=Ga+j\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDFxqF65Q+yXejkvH+GDtIZR6FfQeC3EAAEr9jmYPKCuAIhAMTW34WwroCff/cVqLbV3ONJO2904bVY8XgDLYGwvIPw"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.20.2-alpha.18_1583956142708_0.4468018585650677"},"_hasShrinkwrap":false},"0.20.2-alpha.19":{"name":"@react-ssr/static","version":"0.20.2-alpha.19","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.8.7","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.8.3","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.7","@babel/preset-react":"^7.8.3","@babel/preset-typescript":"^7.8.3","@babel/register":"^7.8.6","@babel/runtime":"^7.8.7","@babel/runtime-corejs3":"^7.8.7","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.3","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.6.0","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.9.0","node-sass":"^4.13.1","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.2","slash":"^3.0.0","terser-webpack-plugin":"^2.3.5","unionfs":"^4.3.2","urlsafe-base64":"^1.0.0","webpack":"^4.42.0","webpack-dev-server":"^3.10.3","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-commonjs":"^11.0.2","@rollup/plugin-node-resolve":"^7.1.1","@types/cheerio":"^0.22.16","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.1.0","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.9.1","@types/node":"^13.7.7","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.23","@types/react-dom":"^16.9.5","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.7","@types/webpack-dev-server":"^3.10.0","@types/webpack-merge":"^4.1.5","cross-env":"^7.0.0","react":"^16.13.0","react-dom":"^16.13.0","rimraf":"^3.0.2","rollup":"^1.32.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-terser":"^5.2.0","typescript":"^3.8.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"78309136665d885c23cb614222ef7f777d259ff3","readme":"## Overview\n\n- Static site generator by using React SSR (Server Side Rendering)\n- Developer Experience\n  - Dynamic `Head` component for better SEO\n  - HMR (Hot Module Replacement) when `process.env.NODE_ENV !== 'production'`\n  - Automatically reflect to the browser as soon as you save the scripts and even if styles\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/static react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"static\",\n    \"build\": \"static build\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ]\n}\n```\n\n**`static.config.js`**:\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n  },\n};\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index() {\n  return <p>Hello Static Site</p>;\n}\n```\n\nFinally,\n\n- run `npm run dev` and you'll see `Hello Static Site` in your browser.\n- run `npm run build` and you'll see the static files in the dist directory.\n\nA working examples are here:\n\n- [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n- [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n- [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n\n## Configuration (`static.config.js`)\n\nHere is the default `static.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: 'dist',\n  viewsDir: 'views',\n  port: 3000,\n  routes: {},\n  publicPaths: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `static.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `static.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `static.config.js#distDir`\n\nThe place where `react-ssr` generates static files. (default: `dist`)\n\n```js\nmodule.exports = {\n  distDir: 'out',\n};\n```\n\n### `static.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\n```js\nmodule.exports = {\n  viewsDir: 'pages',\n};\n```\n\n### `static.config.js#port`\n\nThe port of the development server. (default: `3000`)\n\n```js\nmodule.exports = {\n  port: 4000,\n};\n```\n\n### `static.config.js#routes`\n\nThe key is the route, and the value is the path from the views directory.\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n    '/login': 'auth/login',\n  },\n};\n```\n\n### `static.config.js#publicPaths`\n\nThe place where we put static files like images.\n\n```js\nmodule.exports = {\n  publicPaths: [\n    'public',\n  ],\n};\n```\n\n### `static.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = () => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/static';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.20.2-alpha.19","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-3TytPH9FnNCZ0EhGvyU+lFSbZ7N0FVrexdh8TtTHLVq8P/3VzAOjgAyPlCaSn/hDFj9uqjWo9Hjm9OrQj9E0Ow==","shasum":"e7b33781d1eefbc48ae1707de87af4dc8e4c169c","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.20.2-alpha.19.tgz","fileCount":39,"unpackedSize":239531,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaUFqCRA9TVsSAnZWagAAeJEP/RIkm5jzuMQUjJd5jpZ1\n7cE/QJ4hUBuYhAF1QAse/MY/eJvFvUnEGy1qq8SlOapZDI+jbqXBkJBK3syO\npbeavLGAK1llIVJU7OiyVmYRKAT/KuBZWSccmwrstv9MaLE6fQteuvMjLWdc\neFlHbbfnTRIR4TMu7McfvXRK6h1EH6GO4RXzMyP8rkKpMFtJ7AEVqCkQhsDN\nJZgU/vgnnCS85xi8ncvuCXr5CFlEV/po2r5puyEf/0FAj3xgTwdFwzvDloJ/\nlyGNh6cQGrKU//dn++G30wRUKL25KfssTFtVHtDBPvNuAX05aDixLB++0ND/\nkhvPHtOFwkgi3yqC617jxnMDsKEzJwFgMbwAc+NQPOm6MbGsIMzEeduutfB3\nPvL88uzHv+q2WE+6tzs2MArkXV6yPvmefDGvOfrDoFMz4xOwG6hAMRurNW8Z\ngH9xZ8GKPfKWMb17oHIrfOniw0lGhOotTyw6DNxX+B4q8aWpVMWQ8yByVD84\nyhhl3AFnDi1ALwUtnj1nGmw1iZviRWI8eMxjZ8qJhpp1bwbfF4/+H7k8a3cq\nmNzbMvsmcHLnvZnbX3BUdx9bTbT7UtHx6bzxCUAHTs0kWH8Ui8XxyF/9mgPJ\npFrBAUy/S/6fR5kFvwsEZTKDO4WS1b2Ie/FY4QgmpxAdwIwIddjssih7WB5z\nNZ3V\r\n=6faw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCWUSxUjb8EdmJnvvFfpGEANE3PlAYJ2mGk4qZbDY+LpgIgAoMqPhWcFj2ftWVrxVAEHQYZMoomoaxtuPy5X7pUzJ4="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.20.2-alpha.19_1583956329313_0.8896751938903829"},"_hasShrinkwrap":false},"0.20.2-alpha.20":{"name":"@react-ssr/static","version":"0.20.2-alpha.20","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.8.7","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.8.3","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.7","@babel/preset-react":"^7.8.3","@babel/preset-typescript":"^7.8.3","@babel/register":"^7.8.6","@babel/runtime":"^7.8.7","@babel/runtime-corejs3":"^7.8.7","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.3","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.6.0","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.9.0","node-sass":"^4.13.1","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.2","slash":"^3.0.0","terser-webpack-plugin":"^2.3.5","unionfs":"^4.3.2","urlsafe-base64":"^1.0.0","webpack":"^4.42.0","webpack-dev-server":"^3.10.3","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-commonjs":"^11.0.2","@rollup/plugin-node-resolve":"^7.1.1","@types/cheerio":"^0.22.16","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.1.0","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.9.1","@types/node":"^13.7.7","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.23","@types/react-dom":"^16.9.5","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.7","@types/webpack-dev-server":"^3.10.0","@types/webpack-merge":"^4.1.5","cross-env":"^7.0.0","react":"^16.13.0","react-dom":"^16.13.0","rimraf":"^3.0.2","rollup":"^1.32.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-terser":"^5.2.0","typescript":"^3.8.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"77a7d5a81e15f8c2abba914185ca6117cc1115a6","readme":"## Overview\n\n- Static site generator by using React SSR (Server Side Rendering)\n- Developer Experience\n  - Dynamic `Head` component for better SEO\n  - HMR (Hot Module Replacement) when `process.env.NODE_ENV !== 'production'`\n  - Automatically reflect to the browser as soon as you save the scripts and even if styles\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/static react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"static\",\n    \"build\": \"static build\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ]\n}\n```\n\n**`static.config.js`**:\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n  },\n};\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index() {\n  return <p>Hello Static Site</p>;\n}\n```\n\nFinally,\n\n- run `npm run dev` and you'll see `Hello Static Site` in your browser.\n- run `npm run build` and you'll see the static files in the dist directory.\n\nA working examples are here:\n\n- [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n- [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n- [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n\n## Configuration (`static.config.js`)\n\nHere is the default `static.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: 'dist',\n  viewsDir: 'views',\n  port: 3000,\n  routes: {},\n  publicPaths: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `static.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `static.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `static.config.js#distDir`\n\nThe place where `react-ssr` generates static files. (default: `dist`)\n\n```js\nmodule.exports = {\n  distDir: 'out',\n};\n```\n\n### `static.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\n```js\nmodule.exports = {\n  viewsDir: 'pages',\n};\n```\n\n### `static.config.js#port`\n\nThe port of the development server. (default: `3000`)\n\n```js\nmodule.exports = {\n  port: 4000,\n};\n```\n\n### `static.config.js#routes`\n\nThe key is the route, and the value is the path from the views directory.\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n    '/login': 'auth/login',\n  },\n};\n```\n\n### `static.config.js#publicPaths`\n\nThe place where we put static files like images.\n\n```js\nmodule.exports = {\n  publicPaths: [\n    'public',\n  ],\n};\n```\n\n### `static.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = () => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/static';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.20.2-alpha.20","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-qwGqJJoyklnjWR+IyKA9ACqNYtSzZkOkix/ro0d/3JVret218l0dmt+lk+FCJJcdjnucUCFJYjncEvVzOWdNzQ==","shasum":"a3cb882e87882baf0e3bab93b9e8539793b3f2ff","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.20.2-alpha.20.tgz","fileCount":39,"unpackedSize":239395,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaUKjCRA9TVsSAnZWagAAIHQQAKI9+laafk7ofr6ngbFf\nSotg9vUB6gPDr2Ysuo0mQ/utOBnmIR8Ddsgl0hHZRL9cJ2OKJAmfYtx32dw6\nVLLms+bCPz8DJOqBZwk9+Q84xI76os2i0/iKWskQTwzyxXkdt4ybHvPrLGG8\nJWdqzPw8GWWObjw6fET0edVWPX95SMFaK+cj3N++jhNdBmbGkaSDKFFpiiAQ\nZYcTJ0m1kvmHCPpP1Pv6wbCl079YpFB4EqfpCUZSRuTRlL6HvfE3D9Q5jIy+\nneahaFEVYwVS64yrF2AYyG/MB+1CqbY2Lzm2+V8lpqy4aydjH43h9OL800dH\nIbpWpukUT7tZDDAMUjdheeq4AXYn/HD1lcAXWRq5KL1eMMfM8OJEBTsJa1YS\nfBad5D1nL9NeYLQrmqHZ+wKhIwfW83hpKR3c6wpTDbJ4Vwtn3vPMJuq7GZHC\n5essysblrlsd/ER6UCq62OL+J9zLBcGieBEy1UMMyignJb8DcVjoxkMXK0MU\nUgn1GF9I46eawyqkcy+m3oghvalnssppuECzBNcIOc3K9Lo20oOPU+tjXR6r\nAKxILY95PHhTiCivRIY0t3YiWBoOvN7QkWVixxVC2Wue9cblFljwFAUz1w0+\n6tvmwxkgGUs/4lUaPrCrNnvf+IwO1YmLRLyefzPU2VIj1izDAzs6z/zSCaxa\nHjin\r\n=pyGC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC2vQDYlQjKsKbtZ1iA9pnfaaSs3OAxYHm/uKdBaM++EQIgGNCCVf4DLlrnyC0b3uKQEyTQFY3KvDcBIA50QsXNl9o="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.20.2-alpha.20_1583956643036_0.34979030707868586"},"_hasShrinkwrap":false},"0.20.2-alpha.21":{"name":"@react-ssr/static","version":"0.20.2-alpha.21","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.8.7","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.8.3","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.7","@babel/preset-react":"^7.8.3","@babel/preset-typescript":"^7.8.3","@babel/register":"^7.8.6","@babel/runtime":"^7.8.7","@babel/runtime-corejs3":"^7.8.7","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.3","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.6.0","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.9.0","node-sass":"^4.13.1","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.2","slash":"^3.0.0","terser-webpack-plugin":"^2.3.5","unionfs":"^4.3.2","urlsafe-base64":"^1.0.0","webpack":"^4.42.0","webpack-dev-server":"^3.10.3","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-commonjs":"^11.0.2","@rollup/plugin-node-resolve":"^7.1.1","@types/cheerio":"^0.22.16","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.1.0","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.9.1","@types/node":"^13.7.7","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.23","@types/react-dom":"^16.9.5","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.7","@types/webpack-dev-server":"^3.10.0","@types/webpack-merge":"^4.1.5","cross-env":"^7.0.0","react":"^16.13.0","react-dom":"^16.13.0","rimraf":"^3.0.2","rollup":"^1.32.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-terser":"^5.2.0","typescript":"^3.8.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"ca25eefeb65a8d657569ad16197a93db90e7ab5e","readme":"## Overview\n\n- Static site generator by using React SSR (Server Side Rendering)\n- Developer Experience\n  - Dynamic `Head` component for better SEO\n  - HMR (Hot Module Replacement) when `process.env.NODE_ENV !== 'production'`\n  - Automatically reflect to the browser as soon as you save the scripts and even if styles\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/static react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"static\",\n    \"build\": \"static build\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ]\n}\n```\n\n**`static.config.js`**:\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n  },\n};\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index() {\n  return <p>Hello Static Site</p>;\n}\n```\n\nFinally,\n\n- run `npm run dev` and you'll see `Hello Static Site` in your browser.\n- run `npm run build` and you'll see the static files in the dist directory.\n\nA working examples are here:\n\n- [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n- [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n- [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n\n## Configuration (`static.config.js`)\n\nHere is the default `static.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: 'dist',\n  viewsDir: 'views',\n  port: 3000,\n  routes: {},\n  publicPaths: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `static.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `static.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `static.config.js#distDir`\n\nThe place where `react-ssr` generates static files. (default: `dist`)\n\n```js\nmodule.exports = {\n  distDir: 'out',\n};\n```\n\n### `static.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\n```js\nmodule.exports = {\n  viewsDir: 'pages',\n};\n```\n\n### `static.config.js#port`\n\nThe port of the development server. (default: `3000`)\n\n```js\nmodule.exports = {\n  port: 4000,\n};\n```\n\n### `static.config.js#routes`\n\nThe key is the route, and the value is the path from the views directory.\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n    '/login': 'auth/login',\n  },\n};\n```\n\n### `static.config.js#publicPaths`\n\nThe place where we put static files like images.\n\n```js\nmodule.exports = {\n  publicPaths: [\n    'public',\n  ],\n};\n```\n\n### `static.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = () => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/static';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.20.2-alpha.21","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-eDluCTkR/UETZ6HVOCnXNP/uqo66b4yluIwA045UXJe97anqUj4JGFF1CbMqXOEVcPChsPdLH0SITMfzlHVr3g==","shasum":"6d7790ce76b6a830c076edff3c60825365bd5a62","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.20.2-alpha.21.tgz","fileCount":39,"unpackedSize":239411,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaULeCRA9TVsSAnZWagAA+EYP/iwUOGhnLVjBwxBCpX1l\nzc5F6UiYvjkMkP/TRpSEmncEfTL9kiRGgvwKB4piz0ZZDgH8aSK/8xnEPtNQ\nJ9zUW3YBTLQP8NtcsRLlDy/e2qlIM1qk4lozOI71GW4bI3EvgDp7h1sJGave\nXYQnfh+/3psRmBT4ffjLZ1tKacGVVwBi582aW31tYdqYGMTgvtETXtlu5wbE\nMQu5cqFqXOPTotIZyxg64xBzU+SKOiiN6p+bcvTl5UDi9ngWTkDzlpPdNCT6\nAEk1Dw4L/PdTEqyNGttgKbOhdvI+KA5lMhvO5L6J6ymfckU/CLB9DZdTLAn2\nX0QdhPMqgktonOJKNS8u0+3gicIBqe02Mj3Z1RzKWzgyOtFX0MdzOE360Fl3\n6bOyeJ1kgf8sRbMKd6ZuoNSiioPSCQ/q5zi59D26PB/3NJTbuCNXqy7/JCWV\nNLGyOexqS+3ijeZgqI15c+gIGQQ8CQNLlTot7+V5esYLeB6jvNjfWpzho8U8\nr/e45bwm9mPnWFLBN9tdFywIpu2Wmovy6Hfe7jj+s5NwVTj6KkCxI1lEybYc\ntK9Mj1/nFBKCQ6stmbdmek0hKUhOnGKMo2B8KvsRbE5pOX+MkzCbEb0xoK9p\nLjv+NdupBDwVyvPJkqf6eQvmchzxF5HdcB8dfbvKpaEuJvj4ZEjs59ehD4mt\nFpxF\r\n=EmXx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFWp3wlqv9Xgum+H+im/Df+wS1XYPfRMgstCOQg2aMAuAiEAk37Z5Y3wLNanwbZUiTzvIKFU2BMRU5R0FZmFh5Ko+2M="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.20.2-alpha.21_1583956702054_0.8400776491784716"},"_hasShrinkwrap":false},"0.20.2-alpha.22":{"name":"@react-ssr/static","version":"0.20.2-alpha.22","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.8.7","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.8.3","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.7","@babel/preset-react":"^7.8.3","@babel/preset-typescript":"^7.8.3","@babel/register":"^7.8.6","@babel/runtime":"^7.8.7","@babel/runtime-corejs3":"^7.8.7","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.3","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.6.0","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.9.0","node-sass":"^4.13.1","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.2","slash":"^3.0.0","terser-webpack-plugin":"^2.3.5","unionfs":"^4.3.2","urlsafe-base64":"^1.0.0","webpack":"^4.42.0","webpack-dev-server":"^3.10.3","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-commonjs":"^11.0.2","@rollup/plugin-node-resolve":"^7.1.1","@types/cheerio":"^0.22.16","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.1.0","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.9.1","@types/node":"^13.7.7","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.23","@types/react-dom":"^16.9.5","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.7","@types/webpack-dev-server":"^3.10.0","@types/webpack-merge":"^4.1.5","cross-env":"^7.0.0","react":"^16.13.0","react-dom":"^16.13.0","rimraf":"^3.0.2","rollup":"^1.32.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-terser":"^5.2.0","typescript":"^3.8.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"d7d1695ac88ecae561c3faa420f3c08e1a10524b","readme":"## Overview\n\n- Static site generator by using React SSR (Server Side Rendering)\n- Developer Experience\n  - Dynamic `Head` component for better SEO\n  - HMR (Hot Module Replacement) when `process.env.NODE_ENV !== 'production'`\n  - Automatically reflect to the browser as soon as you save the scripts and even if styles\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/static react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"static\",\n    \"build\": \"static build\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ]\n}\n```\n\n**`static.config.js`**:\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n  },\n};\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index() {\n  return <p>Hello Static Site</p>;\n}\n```\n\nFinally,\n\n- run `npm run dev` and you'll see `Hello Static Site` in your browser.\n- run `npm run build` and you'll see the static files in the dist directory.\n\nA working examples are here:\n\n- [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n- [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n- [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n\n## Configuration (`static.config.js`)\n\nHere is the default `static.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: 'dist',\n  viewsDir: 'views',\n  port: 3000,\n  routes: {},\n  publicPaths: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `static.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `static.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `static.config.js#distDir`\n\nThe place where `react-ssr` generates static files. (default: `dist`)\n\n```js\nmodule.exports = {\n  distDir: 'out',\n};\n```\n\n### `static.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\n```js\nmodule.exports = {\n  viewsDir: 'pages',\n};\n```\n\n### `static.config.js#port`\n\nThe port of the development server. (default: `3000`)\n\n```js\nmodule.exports = {\n  port: 4000,\n};\n```\n\n### `static.config.js#routes`\n\nThe key is the route, and the value is the path from the views directory.\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n    '/login': 'auth/login',\n  },\n};\n```\n\n### `static.config.js#publicPaths`\n\nThe place where we put static files like images.\n\n```js\nmodule.exports = {\n  publicPaths: [\n    'public',\n  ],\n};\n```\n\n### `static.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = () => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/static';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.20.2-alpha.22","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-c4ptFQQGFhuMAAP9DRf447cXPbcJLcLnhYHjLAqzYLtSw6XFNUId2Zt6vRg9ghxdf6VMFUbMZxIFsBJ59DcOMA==","shasum":"28248be12fbc77b4cd5339b0ffdf8d131e349119","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.20.2-alpha.22.tgz","fileCount":39,"unpackedSize":239419,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaUMMCRA9TVsSAnZWagAAafAP/A0YM9XSt7+AZf6P3bgf\n1BeyzafO7B62UCfmV/61Wt0oMVH65/jxeNro7kbddeHs7EJjiIf395hiNG1O\noaBmA/3BYOAEACDmGYqke0Kz2yzEiVxKy7zeNZM/co3YHPjm9IKQwGOKO2Ox\nXr7jNumIUHTu6kOnZfzP24f5JtDqttKKyvzIZtJlqlAr4s/6+hyjeZw4m55T\nIBajBGVRg/7rzCvr0DlZdRpGU/15l/BpT5s9plqF6ZLCJDkJVDhWie6ibmYH\ng83mfxCEmWSmz5LYppxfGLamEXah2Dy9WIlUcvn/37UkqcJd3HSnSRRoSMNM\nkNgJhoLOyBGZ5WLOYdHAcMEwCi2wFP0zzwqySwiiN1oqUNX7RQZZ7LupN3/I\nHG3JWFlSNMK61+/aGcuB2fOG0JCbJpmhKRijZ68OV3j1iKMWlpYL2+zgq1cx\nzSeVTrhG1+nmP2ox+sEvyqdXBya1rCnF/5hk01NDGWDynxzLpr3PQL0ADqWu\nHdvbASjChGA7drzAzaMQkm8eTEL6lLz3Ow/pwgXd3e5nIR5r/k6pFRNhn+ST\nQ+N9Yu+Ab9iyL8xYDcml4SJxmFDUt9tCZynUquNPWquZvhOBzFgCO+JBGg48\ndHJFZW7/XLKQ/KFOFUm4hgJMBzrO5PNCl6cnc/wzFXKvdPwmiUxk2ZQCrHkc\nwHzI\r\n=z3UL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBXkCkGKGEF9RHP5LUJ3rmgand+35AUxk4JI2GikWgCcAiEA0Sg+5bTCG5SOh8TDLl0+Q0d6BZhIxJT4hn7ac8wieuA="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.20.2-alpha.22_1583956748537_0.7365327789867526"},"_hasShrinkwrap":false},"0.20.2-alpha.23":{"name":"@react-ssr/static","version":"0.20.2-alpha.23","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.8.7","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.8.3","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.7","@babel/preset-react":"^7.8.3","@babel/preset-typescript":"^7.8.3","@babel/register":"^7.8.6","@babel/runtime":"^7.8.7","@babel/runtime-corejs3":"^7.8.7","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.3","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.6.0","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.9.0","node-sass":"^4.13.1","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.2","slash":"^3.0.0","terser-webpack-plugin":"^2.3.5","unionfs":"^4.3.2","urlsafe-base64":"^1.0.0","webpack":"^4.42.0","webpack-dev-server":"^3.10.3","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-commonjs":"^11.0.2","@rollup/plugin-node-resolve":"^7.1.1","@types/cheerio":"^0.22.16","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.1.0","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.9.1","@types/node":"^13.7.7","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.23","@types/react-dom":"^16.9.5","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.7","@types/webpack-dev-server":"^3.10.0","@types/webpack-merge":"^4.1.5","cross-env":"^7.0.0","react":"^16.13.0","react-dom":"^16.13.0","rimraf":"^3.0.2","rollup":"^1.32.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-terser":"^5.2.0","typescript":"^3.8.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"09ccd27c8eae060a7077f709f383e3bb827f4303","readme":"## Overview\n\n- Static site generator by using React SSR (Server Side Rendering)\n- Developer Experience\n  - Dynamic `Head` component for better SEO\n  - HMR (Hot Module Replacement) when `process.env.NODE_ENV !== 'production'`\n  - Automatically reflect to the browser as soon as you save the scripts and even if styles\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/static react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"static\",\n    \"build\": \"static build\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ]\n}\n```\n\n**`static.config.js`**:\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n  },\n};\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index() {\n  return <p>Hello Static Site</p>;\n}\n```\n\nFinally,\n\n- run `npm run dev` and you'll see `Hello Static Site` in your browser.\n- run `npm run build` and you'll see the static files in the dist directory.\n\nA working examples are here:\n\n- [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n- [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n- [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n\n## Configuration (`static.config.js`)\n\nHere is the default `static.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: 'dist',\n  viewsDir: 'views',\n  port: 3000,\n  routes: {},\n  publicPaths: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `static.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `static.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `static.config.js#distDir`\n\nThe place where `react-ssr` generates static files. (default: `dist`)\n\n```js\nmodule.exports = {\n  distDir: 'out',\n};\n```\n\n### `static.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\n```js\nmodule.exports = {\n  viewsDir: 'pages',\n};\n```\n\n### `static.config.js#port`\n\nThe port of the development server. (default: `3000`)\n\n```js\nmodule.exports = {\n  port: 4000,\n};\n```\n\n### `static.config.js#routes`\n\nThe key is the route, and the value is the path from the views directory.\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n    '/login': 'auth/login',\n  },\n};\n```\n\n### `static.config.js#publicPaths`\n\nThe place where we put static files like images.\n\n```js\nmodule.exports = {\n  publicPaths: [\n    'public',\n  ],\n};\n```\n\n### `static.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = () => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/static';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.20.2-alpha.23","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-KZtM3VTm7UqBShE/lwfCjR8t9zvbFJzI7PdLQrwYEY6uozdIGCI2cXLObhBr3/i1fuZpLm1Eq0WXNfOeNWRgPQ==","shasum":"063ac0d39749561b934380796ba7691821ba4260","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.20.2-alpha.23.tgz","fileCount":39,"unpackedSize":239035,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaUQYCRA9TVsSAnZWagAADEUP/j4qG4YUP7JgbnvB4WR1\nir1T9XSeDIJvTWsICFbHLUV0uQIC1em6rADa4PCDxWUTWh6PAK31kX2zYvW+\nvziUw/axRce028xcmnog0evy6qtbqmQGKbsEN+MSRvbHeDiLA9IuepYEfFXC\nI02ScUtdk8ujcw2MIp4DMEt9aLWheMJhqhnLfYdiNaUMChUiNnYeuifCFMfO\nr/SFzgkygFtw3PzxN+SuD5nFS+GNXjucuj0uAVhq3n8AUbBBGm7G/ywDEZkC\n0zlQjwHzQ00Nk5O4zG33fPvU/yU2ufOfnrBbViUr17tk9Lne6aZX+eWw6i8U\n3hSBbu8OtB9gja+bWwqQ0RvRLGYF1WKnvWDXZjN/O2j+y+q55qG5CgqxPSnc\n7uQ48sUusFajIc2JfJfqc2ZSM9dMS3ecx1guC+U+XP8NCDXQKnedItTqF6Fj\nxbD2tVegdl23Zyj1Vg7IiHBgQEONdttD8Wk4clYIWUTdZs1v2YSHhfEq4JBm\nBfgvC4GgwRd5yCLF8xJhYVlou+nNCSKz+maSQByfHWHZWCxP46uibQA84kSV\nd7afDOIYK2h1bQrXoHdWnjHgP5AiSAOP+izgQK2IAH3oxq2cVaLqfld6h12j\nP3Zow27PyLsd96sGc7o6PwvUWjiupWSaMjG50UzH8mzzsyW5ECUdDtXXo0iI\nmN/V\r\n=SvZD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICROIpM9A9knUik+18KHOqno8IHKhjGzeaHDdsA5V+6pAiEA+TSH5egITA/uDFF2XFKZT77iPHiY+m1owmDR25jQ+SM="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.20.2-alpha.23_1583957015910_0.25009552510950006"},"_hasShrinkwrap":false},"0.20.2-alpha.24":{"name":"@react-ssr/static","version":"0.20.2-alpha.24","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.8.7","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.8.3","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.7","@babel/preset-react":"^7.8.3","@babel/preset-typescript":"^7.8.3","@babel/register":"^7.8.6","@babel/runtime":"^7.8.7","@babel/runtime-corejs3":"^7.8.7","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.3","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.6.0","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.9.0","node-sass":"^4.13.1","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.2","slash":"^3.0.0","terser-webpack-plugin":"^2.3.5","unionfs":"^4.3.2","urlsafe-base64":"^1.0.0","webpack":"^4.42.0","webpack-dev-server":"^3.10.3","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-commonjs":"^11.0.2","@rollup/plugin-node-resolve":"^7.1.1","@types/cheerio":"^0.22.16","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.1.0","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.9.1","@types/node":"^13.7.7","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.23","@types/react-dom":"^16.9.5","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.7","@types/webpack-dev-server":"^3.10.0","@types/webpack-merge":"^4.1.5","cross-env":"^7.0.0","react":"^16.13.0","react-dom":"^16.13.0","rimraf":"^3.0.2","rollup":"^1.32.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-terser":"^5.2.0","typescript":"^3.8.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"3e201829a314d3780d6fdde68e034e613fee2236","readme":"## Overview\n\n- Static site generator by using React SSR (Server Side Rendering)\n- Developer Experience\n  - Dynamic `Head` component for better SEO\n  - HMR (Hot Module Replacement) when `process.env.NODE_ENV !== 'production'`\n  - Automatically reflect to the browser as soon as you save the scripts and even if styles\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/static react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"static\",\n    \"build\": \"static build\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ]\n}\n```\n\n**`static.config.js`**:\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n  },\n};\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index() {\n  return <p>Hello Static Site</p>;\n}\n```\n\nFinally,\n\n- run `npm run dev` and you'll see `Hello Static Site` in your browser.\n- run `npm run build` and you'll see the static files in the dist directory.\n\nA working examples are here:\n\n- [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n- [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n- [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n\n## Configuration (`static.config.js`)\n\nHere is the default `static.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: 'dist',\n  viewsDir: 'views',\n  port: 3000,\n  routes: {},\n  publicPaths: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `static.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `static.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `static.config.js#distDir`\n\nThe place where `react-ssr` generates static files. (default: `dist`)\n\n```js\nmodule.exports = {\n  distDir: 'out',\n};\n```\n\n### `static.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\n```js\nmodule.exports = {\n  viewsDir: 'pages',\n};\n```\n\n### `static.config.js#port`\n\nThe port of the development server. (default: `3000`)\n\n```js\nmodule.exports = {\n  port: 4000,\n};\n```\n\n### `static.config.js#routes`\n\nThe key is the route, and the value is the path from the views directory.\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n    '/login': 'auth/login',\n  },\n};\n```\n\n### `static.config.js#publicPaths`\n\nThe place where we put static files like images.\n\n```js\nmodule.exports = {\n  publicPaths: [\n    'public',\n  ],\n};\n```\n\n### `static.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = () => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/static';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.20.2-alpha.24","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-vGrw53AVS/Y5U85S0ZfnCZzjb/a3m/boEMzT0df9ooNUwmF+3k6XHgl188+cY0DJ78Dr1yBFboboSSc+HyGTWQ==","shasum":"36c8472aba798244d98d693f56ba03e9e5e7754b","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.20.2-alpha.24.tgz","fileCount":39,"unpackedSize":239215,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaUSHCRA9TVsSAnZWagAAh1sP/3idr2BDn14fYC4ETtT4\nhO8pLvxPiR1qdobisFYJnKdkJID0zr2It5lcQEV45sXsKT408DYzqCx1s+P5\n+Lk7aKVHOyhrr8US7vK+7egvOUQgk1VoUF5mWDIBvyD231kBPp6rhDYFvAQH\nfWl9gzU3flhAub987a12Tr3CiTIagKSP0xzP0JYyZxg0kIAMsbjk0fOQLTPj\n46g/yhWT5w2BuXEeyYE4UIXkIXzGSsGieoxbfWW771MmGxajPDreymRZrh3X\n7BkG0ixSGcoFq4Ku6V7WKTNGVZQ4Qcvwj5/Gk3bzrJFAKryHbp04N3HmVy/v\n3/h6jcL0k2Glm+PPKNTmTJWaPQ/CZ9Q/07Q8fzdiKEGucArq78Nn0aB5pffx\nu3HK8sTZevXmfytQMw2n4guaWuQ2vR3IDfXSIu6JRG/hLQ7TWingTAWRDcX2\nSSruHgWvJB1GGThS0/4GOf+zqZQQtBBK4PH5u9/GMIzGh+UricwyeOi8TAke\nkGH1Xh9Ou/ZB/XoRp3RIQem9Y2O6rU6GMShBD2av4evhIhzJpLPrFzsNHUJK\nqVc+9Uowak4ZPbxZm9DEAS33mj+6DZ87U7j59FwkrPmVeNG61CHBjGjsEqcb\nQmiPpX9VrlwPpfsLq3/mcoq2p/FmUCQWrWfXLPpUkOOw6k2YXum4rvBKjFvG\nPR06\r\n=zsI8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDgKF55bCu5U+tHPgjY6knfCZpdohGGZ7lkboxWisk08QIhAPETKJ67hJccv5Dwg841W3LyVeJv6kcRNRhAxhDl0E3V"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.20.2-alpha.24_1583957126475_0.33005413742726675"},"_hasShrinkwrap":false},"0.20.2-alpha.25":{"name":"@react-ssr/static","version":"0.20.2-alpha.25","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.8.7","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.8.3","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.7","@babel/preset-react":"^7.8.3","@babel/preset-typescript":"^7.8.3","@babel/register":"^7.8.6","@babel/runtime":"^7.8.7","@babel/runtime-corejs3":"^7.8.7","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.3","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.6.0","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.9.0","node-sass":"^4.13.1","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.2","slash":"^3.0.0","terser-webpack-plugin":"^2.3.5","unionfs":"^4.3.2","urlsafe-base64":"^1.0.0","webpack":"^4.42.0","webpack-dev-server":"^3.10.3","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-commonjs":"^11.0.2","@rollup/plugin-node-resolve":"^7.1.1","@types/cheerio":"^0.22.16","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.1.0","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.9.1","@types/node":"^13.7.7","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.23","@types/react-dom":"^16.9.5","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.7","@types/webpack-dev-server":"^3.10.0","@types/webpack-merge":"^4.1.5","cross-env":"^7.0.0","react":"^16.13.0","react-dom":"^16.13.0","rimraf":"^3.0.2","rollup":"^1.32.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-terser":"^5.2.0","typescript":"^3.8.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"364e0af0fd73d97f588522083ef9a8983158c051","readme":"## Overview\n\n- Static site generator by using React SSR (Server Side Rendering)\n- Developer Experience\n  - Dynamic `Head` component for better SEO\n  - HMR (Hot Module Replacement) when `process.env.NODE_ENV !== 'production'`\n  - Automatically reflect to the browser as soon as you save the scripts and even if styles\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/static react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"static\",\n    \"build\": \"static build\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ]\n}\n```\n\n**`static.config.js`**:\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n  },\n};\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index() {\n  return <p>Hello Static Site</p>;\n}\n```\n\nFinally,\n\n- run `npm run dev` and you'll see `Hello Static Site` in your browser.\n- run `npm run build` and you'll see the static files in the dist directory.\n\nA working examples are here:\n\n- [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n- [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n- [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n\n## Configuration (`static.config.js`)\n\nHere is the default `static.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: 'dist',\n  viewsDir: 'views',\n  port: 3000,\n  routes: {},\n  publicPaths: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `static.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `static.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `static.config.js#distDir`\n\nThe place where `react-ssr` generates static files. (default: `dist`)\n\n```js\nmodule.exports = {\n  distDir: 'out',\n};\n```\n\n### `static.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\n```js\nmodule.exports = {\n  viewsDir: 'pages',\n};\n```\n\n### `static.config.js#port`\n\nThe port of the development server. (default: `3000`)\n\n```js\nmodule.exports = {\n  port: 4000,\n};\n```\n\n### `static.config.js#routes`\n\nThe key is the route, and the value is the path from the views directory.\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n    '/login': 'auth/login',\n  },\n};\n```\n\n### `static.config.js#publicPaths`\n\nThe place where we put static files like images.\n\n```js\nmodule.exports = {\n  publicPaths: [\n    'public',\n  ],\n};\n```\n\n### `static.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = () => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/static';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.20.2-alpha.25","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-0CkI2uPvBim3JLIph8Iv2bukxPKv0xCL0SXmyeSStM4MxKmMD/bI5CzvyvsJZ62Qlrx3DNPRKCiBsG4EKwKJAA==","shasum":"35f6a5037893705a855af9faad35decd91df81f1","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.20.2-alpha.25.tgz","fileCount":39,"unpackedSize":239387,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaUT0CRA9TVsSAnZWagAAXmMP/1VGwepevyP/1UfSk1Un\nv7wpiJQk6RakSrBs5/7YgaPfHFywiZuyrsIvmKk6caV1cZQnCghQf+kOYtZD\n+T0P5ONhxc4lm+4cbqiN2hXmPtOm3AS9wcCL9smsiyyCAupJrWwPOx4siFe1\n3sLlAzB47GRfzyHw67PAxAzxtwe7GDyuIDHWAyG7eBhr0nzyEpWu2BgcfI8v\nyY2CbtYeP2gf67tAVv6NqDIxq8+rBZtCa5ZDnF/H9p2D3PuiJEfEl9LgC3Sx\n9Zz4r+lrALmP6Id5mXwLlevJxGKTKc29hmIF7IeHu8CMg2BQkLNIWf/4nLKz\nXAZC6UoSYb3Md1hfi1QV2q/qVIdOvi+9euTE85j1qWwUffvYiXEj9fArt8Wg\nLs9kAPdIztDsWluUKG0E300Wtz50ZhAI43NCjeZp00n485PtHtnCuo3cglEj\nSAHIWAjt+td8PdP+J7x+YgHUX9Ltk5E9vXZZbRmX6z7yDkpB4dsOu6JTGjzz\nlgy3sRk1AaZ5bfIfCQcFLVw3XG77rn3U2VDBZPYmbkLV2JnRON0UZ+fSxZc9\nYpBmWfwBDxJCZQM+TagT8TWDtfIQzYVq93eOyeQCaeT8P1dT83IIxKe6zYE6\nqZi8BcwIDobG9K7g3MdAJ7iGHxAyUEW+rwj1pGFutziAv5tAegRrmPdlW1eK\nc4IT\r\n=CNAm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCTz14erbiUavM43BY9toIE0SvcLJt1P3ObxKRVe0n7BgIhAOwAQ2VDDGbmlbBRVQ+brvmClZlbQa31AvhtvnIjjANn"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.20.2-alpha.25_1583957236164_0.02856292812151029"},"_hasShrinkwrap":false},"0.20.2-alpha.27":{"name":"@react-ssr/static","version":"0.20.2-alpha.27","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.8.7","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.8.3","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.7","@babel/preset-react":"^7.8.3","@babel/preset-typescript":"^7.8.3","@babel/register":"^7.8.6","@babel/runtime":"^7.8.7","@babel/runtime-corejs3":"^7.8.7","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.3","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.6.0","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.9.0","node-sass":"^4.13.1","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.2","slash":"^3.0.0","terser-webpack-plugin":"^2.3.5","unionfs":"^4.3.2","urlsafe-base64":"^1.0.0","webpack":"^4.42.0","webpack-dev-server":"^3.10.3","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-commonjs":"^11.0.2","@rollup/plugin-node-resolve":"^7.1.1","@types/cheerio":"^0.22.16","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.1.0","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.9.1","@types/node":"^13.7.7","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.23","@types/react-dom":"^16.9.5","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.7","@types/webpack-dev-server":"^3.10.0","@types/webpack-merge":"^4.1.5","cross-env":"^7.0.0","react":"^16.13.0","react-dom":"^16.13.0","rimraf":"^3.0.2","rollup":"^1.32.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-terser":"^5.2.0","typescript":"^3.8.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"cda84519d474b9cd7fd89435af50f7fcac210937","readme":"## Overview\n\n- Static site generator by using React SSR (Server Side Rendering)\n- Developer Experience\n  - Dynamic `Head` component for better SEO\n  - HMR (Hot Module Replacement) when `process.env.NODE_ENV !== 'production'`\n  - Automatically reflect to the browser as soon as you save the scripts and even if styles\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/static react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"static\",\n    \"build\": \"static build\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ]\n}\n```\n\n**`static.config.js`**:\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n  },\n};\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index() {\n  return <p>Hello Static Site</p>;\n}\n```\n\nFinally,\n\n- run `npm run dev` and you'll see `Hello Static Site` in your browser.\n- run `npm run build` and you'll see the static files in the dist directory.\n\nA working examples are here:\n\n- [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n- [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n- [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n\n## Configuration (`static.config.js`)\n\nHere is the default `static.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: 'dist',\n  viewsDir: 'views',\n  port: 3000,\n  routes: {},\n  publicPaths: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `static.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `static.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `static.config.js#distDir`\n\nThe place where `react-ssr` generates static files. (default: `dist`)\n\n```js\nmodule.exports = {\n  distDir: 'out',\n};\n```\n\n### `static.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\n```js\nmodule.exports = {\n  viewsDir: 'pages',\n};\n```\n\n### `static.config.js#port`\n\nThe port of the development server. (default: `3000`)\n\n```js\nmodule.exports = {\n  port: 4000,\n};\n```\n\n### `static.config.js#routes`\n\nThe key is the route, and the value is the path from the views directory.\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n    '/login': 'auth/login',\n  },\n};\n```\n\n### `static.config.js#publicPaths`\n\nThe place where we put static files like images.\n\n```js\nmodule.exports = {\n  publicPaths: [\n    'public',\n  ],\n};\n```\n\n### `static.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = () => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/static';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.20.2-alpha.27","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-1eoA6NQesxPYgosp2xBLqjXynkvqYKAdMIeU7BEBDhJTNMou3NoXRY/ine34qKHn5a1b0GOlA6qx1QBETinL6Q==","shasum":"91c0f842ee4ca161d9e6b607de97ec1d608dc396","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.20.2-alpha.27.tgz","fileCount":39,"unpackedSize":239403,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaUVwCRA9TVsSAnZWagAAx14P/A5n4HS7qfK+yJL0n7tr\nnEMUGq5z5hPJl6o+L5lozNPJ76oGEYf5Pca9ZdGe4wtWMhGVOD6pTgpHb0Ik\nI4aJgXiiU3ii51yMeciLeiqi9/2SexsS3CyICCsU1aIB5nu53O4LZuPTSkAm\nVDIAS/ninvYdXGuHfTfiwJEwhLHB8U9fBPDDJoifDQ1TxbBS+JlYrZx2u21L\nJM+FV4IpXHC4jvHoWlANzkAi3trESA2yuZcFmFlnX2btidg0nNpbE3bOr33A\nGIzkGzvNn9M8wJgQwxqAN5/tI8Gffk1Or1T93qp1yKt7TOm31GupnOlPn8oc\ng6f3AYc7ZXReChvh6t1/MuQd0k0goeN+F/rPqHIFOE6zd6Mp93QFfPsUr/YC\nkqipcKQSUE27x+REehOpuBxJrhVfnhzuRGtidi53h9gdy/SRIBXKkfrWDmbE\njJKVvBStM0ajeJHasvQWVFF9dtPU1GeuDVw5/Hmhc8MI92QKhwXArfpq+wZ7\nVYa4XsWjJJVtbHPv96tcuBsdKRa4glGPtI2Od8tkYa/zu5+/5IU17ysmWC2U\nub/7u5qQ+7j2F8hjOAllCm6Xvh0ebo40TQ4h51EDaxU7A7y1SwgzlzGngcKy\nO613/02vIm3KPW8odjF3YsuWOEQw2OXrp1nr7/h2vWBTH9GlCVRXMImHWBo9\nVpOY\r\n=DCVL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCWyV+IiOAR95jMyG3l16JI6EQ0aZNLIpaz6dvodQa98gIgaYFLGL7DSHtsKGBvzKIvx9wZj0DUrQ+1MF4cQkzp6OI="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.20.2-alpha.27_1583957359951_0.275965602546989"},"_hasShrinkwrap":false},"0.20.2-alpha.28":{"name":"@react-ssr/static","version":"0.20.2-alpha.28","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.8.7","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.8.3","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.7","@babel/preset-react":"^7.8.3","@babel/preset-typescript":"^7.8.3","@babel/register":"^7.8.6","@babel/runtime":"^7.8.7","@babel/runtime-corejs3":"^7.8.7","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.3","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.6.0","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.9.0","node-sass":"^4.13.1","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.2","slash":"^3.0.0","terser-webpack-plugin":"^2.3.5","unionfs":"^4.3.2","urlsafe-base64":"^1.0.0","webpack":"^4.42.0","webpack-dev-server":"^3.10.3","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-commonjs":"^11.0.2","@rollup/plugin-node-resolve":"^7.1.1","@types/cheerio":"^0.22.16","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.1.0","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.9.1","@types/node":"^13.7.7","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.23","@types/react-dom":"^16.9.5","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.7","@types/webpack-dev-server":"^3.10.0","@types/webpack-merge":"^4.1.5","cross-env":"^7.0.0","react":"^16.13.0","react-dom":"^16.13.0","rimraf":"^3.0.2","rollup":"^1.32.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-terser":"^5.2.0","typescript":"^3.8.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"2ef0cc1c8b1a0c3ed11bad407ddd8b5204854fc4","readme":"## Overview\n\n- Static site generator by using React SSR (Server Side Rendering)\n- Developer Experience\n  - Dynamic `Head` component for better SEO\n  - HMR (Hot Module Replacement) when `process.env.NODE_ENV !== 'production'`\n  - Automatically reflect to the browser as soon as you save the scripts and even if styles\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/static react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"static\",\n    \"build\": \"static build\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ]\n}\n```\n\n**`static.config.js`**:\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n  },\n};\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index() {\n  return <p>Hello Static Site</p>;\n}\n```\n\nFinally,\n\n- run `npm run dev` and you'll see `Hello Static Site` in your browser.\n- run `npm run build` and you'll see the static files in the dist directory.\n\nA working examples are here:\n\n- [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n- [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n- [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n\n## Configuration (`static.config.js`)\n\nHere is the default `static.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: 'dist',\n  viewsDir: 'views',\n  port: 3000,\n  routes: {},\n  publicPaths: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `static.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `static.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `static.config.js#distDir`\n\nThe place where `react-ssr` generates static files. (default: `dist`)\n\n```js\nmodule.exports = {\n  distDir: 'out',\n};\n```\n\n### `static.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\n```js\nmodule.exports = {\n  viewsDir: 'pages',\n};\n```\n\n### `static.config.js#port`\n\nThe port of the development server. (default: `3000`)\n\n```js\nmodule.exports = {\n  port: 4000,\n};\n```\n\n### `static.config.js#routes`\n\nThe key is the route, and the value is the path from the views directory.\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n    '/login': 'auth/login',\n  },\n};\n```\n\n### `static.config.js#publicPaths`\n\nThe place where we put static files like images.\n\n```js\nmodule.exports = {\n  publicPaths: [\n    'public',\n  ],\n};\n```\n\n### `static.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = () => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/static';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.20.2-alpha.28","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-lASVOl2up3sZ/c80m1D8e/gMptgs6M8WSn0CFRd4W0umqUa3YDxub6iD1dVS2lnAlSTLcYymunmW50+P2Lie7w==","shasum":"3c692411ad1e5df5a79f2a1352692303776b6eb6","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.20.2-alpha.28.tgz","fileCount":39,"unpackedSize":239563,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaUY7CRA9TVsSAnZWagAAVBcP/j1eITB8BSCbW1rlZD9m\ngOE1WrvcS5x+VXWu23MPZ9A1fowQhYUgkzxopvz4xc3sRSldLKVzTV7ePvu5\nHva0fCMDqaecOrCPaTv3pLi/pJVzwksSdfJFvzMHgbSMoEJ53tKjWgvnXKzR\nR7IIfgRhFsOry4cGMeCCfAGljbUJ8BscF+Y5l4RYeqKVkGSX3lLjxQghJKGO\n9CjUOYHvh5RicpXgfQ+CunLREFnPBvJS4q71wVrCBWuSdFjkPmT+lVBuVMXj\nDzrYiuqdKE8isy2fw4KAlzEFsZ/e5CD3aoUTUN7c3K8peO8Ha68tYOcAGkbZ\nQpw5CWEEYf7+PJesvd/1WaKUX7Lji2dAp61EbnOgM8sC9FbkxFWb3vLRlEbz\nb+2M+PvUV8Z42WMg3YuuWDi7dBFKPruE5015sLv6AL9RenQb44Qo410ult9g\negUHE9MUtYnrXzblytR0Q3iYSatki0B/A7APBPdIexlI0uwaTKtPd3wnRX5m\nj0tXtagDHIpXUbCyJ6o41gfT8R7DP7fcctgG0JQHdG9ZLF5s0fAbITzztQ8D\nAgRbH5JB5+LsIeDeVK4ZniLzV4rSnbNXrx0LT2EQ767s+1aXwX1T6cw4tUny\nrTsSeMTX5nqbiXfEoB7Blpiy9eNqhqtYVr1exN5wR20E8SSTypcK/CeKGBHb\nO+BM\r\n=eykO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGjVied/aFjkcsV/t94zSv9z/8Jc6jJoAn8e7tACFcovAiEA8Hc2U/LvesqLkDLPR0wcwAK0L324XFbQVlqAIPuDg4Q="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.20.2-alpha.28_1583957563277_0.6584657148859074"},"_hasShrinkwrap":false},"0.20.2-alpha.30":{"name":"@react-ssr/static","version":"0.20.2-alpha.30","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.8.7","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.8.3","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.7","@babel/preset-react":"^7.8.3","@babel/preset-typescript":"^7.8.3","@babel/register":"^7.8.6","@babel/runtime":"^7.8.7","@babel/runtime-corejs3":"^7.8.7","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.3","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.6.0","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.9.0","node-sass":"^4.13.1","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.2","slash":"^3.0.0","terser-webpack-plugin":"^2.3.5","unionfs":"^4.3.2","urlsafe-base64":"^1.0.0","webpack":"^4.42.0","webpack-dev-server":"^3.10.3","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-commonjs":"^11.0.2","@rollup/plugin-node-resolve":"^7.1.1","@types/cheerio":"^0.22.16","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.1.0","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.9.1","@types/node":"^13.7.7","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.23","@types/react-dom":"^16.9.5","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.7","@types/webpack-dev-server":"^3.10.0","@types/webpack-merge":"^4.1.5","cross-env":"^7.0.0","react":"^16.13.0","react-dom":"^16.13.0","rimraf":"^3.0.2","rollup":"^1.32.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-terser":"^5.2.0","typescript":"^3.8.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"de4c315702240fd87b7fd89b6375fd1390fb360c","readme":"## Overview\n\n- Static site generator by using React SSR (Server Side Rendering)\n- Developer Experience\n  - Dynamic `Head` component for better SEO\n  - HMR (Hot Module Replacement) when `process.env.NODE_ENV !== 'production'`\n  - Automatically reflect to the browser as soon as you save the scripts and even if styles\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/static react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"static\",\n    \"build\": \"static build\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ]\n}\n```\n\n**`static.config.js`**:\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n  },\n};\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index() {\n  return <p>Hello Static Site</p>;\n}\n```\n\nFinally,\n\n- run `npm run dev` and you'll see `Hello Static Site` in your browser.\n- run `npm run build` and you'll see the static files in the dist directory.\n\nA working examples are here:\n\n- [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n- [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n- [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n\n## Configuration (`static.config.js`)\n\nHere is the default `static.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: 'dist',\n  viewsDir: 'views',\n  port: 3000,\n  routes: {},\n  publicPaths: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `static.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `static.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `static.config.js#distDir`\n\nThe place where `react-ssr` generates static files. (default: `dist`)\n\n```js\nmodule.exports = {\n  distDir: 'out',\n};\n```\n\n### `static.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\n```js\nmodule.exports = {\n  viewsDir: 'pages',\n};\n```\n\n### `static.config.js#port`\n\nThe port of the development server. (default: `3000`)\n\n```js\nmodule.exports = {\n  port: 4000,\n};\n```\n\n### `static.config.js#routes`\n\nThe key is the route, and the value is the path from the views directory.\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n    '/login': 'auth/login',\n  },\n};\n```\n\n### `static.config.js#publicPaths`\n\nThe place where we put static files like images.\n\n```js\nmodule.exports = {\n  publicPaths: [\n    'public',\n  ],\n};\n```\n\n### `static.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = () => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/static';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.20.2-alpha.30","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-vv143VkKXnnJFTDsgxQELsdYOquApNPktSX00dZjbGPa/6dnZcB7BqgN3Zf9J3OBVAwtvz3HnS20piZG5HTZew==","shasum":"4ef0b8be4d94929eec5691a856f9b5a0b69a85f7","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.20.2-alpha.30.tgz","fileCount":26,"unpackedSize":97028,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaUtLCRA9TVsSAnZWagAASOAP/RFlU42io1nAgTT2j+jY\n1rnQ7MZcp6t+CybUf1kCWPKjCD5LnooBuko2pYmTZtLfHs5Pb/RxZSkOJYFw\nSSA55+q76MxCrHW6qvnRSICHMC0pcnuzC/fqgYm/RjWizFDJsNobPwSY/Z6I\nj7bbrmEopgSxlO7zwK7SenOXWwN4v7mcPw4qhbnTKZH8mVRmrJZI1Y0D9z6r\nVM5xyNvLdJygmV7HXBAwWRkzgOK3QEbKA+q24Zl7DO1L1ksCz80BlSc3yW+W\nZodZaj4ROI0zite8aZgkmajvUsqPlQaFnpsCGzlmDc1PR7khdh0JC1kBl5o1\n15HcBlKDp9RlRCLkis4YFkAla0bVRIkhW9S8bUctj3gao+RCzyHzVuwrKp65\nyGM4fGKTakuDibgrNVFEUShBwlGiBU+D/Kqi6NwOSvXlnHzm4lbc0V39IrRE\nEcv/Nrr4AdJjD2Fqt3SqRyWpzfk5qxWw9/fnZ/uK2hmpd3xNNKGYb0vV0cUn\nETYkUxkVRnaSx3tgWMPfnr5Tq30hiP5y4Qxsyg07Y8MbX97Tv7XFoRk4EQfC\na3ZgFAwgFELv1Jv+ypJefD1CLcBd/F2soRcHHQZ4Ngl9kOMU8zgR6tmKnbIx\ngJOuGPyDN19HEiGxq2GejQ/s/t9Embjm4+wvCu9+iR9R7NFVSdqJRakWbdXg\n1Txf\r\n=MuhY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICCq3+i93drAU6WbUykRdLIoAzsi4vkBkrlYgodK5y/bAiBE4o5Q+kmF2MH6mydTG4S6d9LUIDApaYnMRa1bKCNbWA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.20.2-alpha.30_1583958858749_0.2979531644772151"},"_hasShrinkwrap":false},"0.20.2-alpha.31":{"name":"@react-ssr/static","version":"0.20.2-alpha.31","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.8.7","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.8.3","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.7","@babel/preset-react":"^7.8.3","@babel/preset-typescript":"^7.8.3","@babel/register":"^7.8.6","@babel/runtime":"^7.8.7","@babel/runtime-corejs3":"^7.8.7","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.3","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.6.0","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.9.0","node-sass":"^4.13.1","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.2","slash":"^3.0.0","terser-webpack-plugin":"^2.3.5","unionfs":"^4.3.2","urlsafe-base64":"^1.0.0","webpack":"^4.42.0","webpack-dev-server":"^3.10.3","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-commonjs":"^11.0.2","@rollup/plugin-node-resolve":"^7.1.1","@types/cheerio":"^0.22.16","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.1.0","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.9.1","@types/node":"^13.7.7","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.23","@types/react-dom":"^16.9.5","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.7","@types/webpack-dev-server":"^3.10.0","@types/webpack-merge":"^4.1.5","cross-env":"^7.0.0","react":"^16.13.0","react-dom":"^16.13.0","rimraf":"^3.0.2","rollup":"^1.32.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-terser":"^5.2.0","typescript":"^3.8.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"365821fb8d2a362ac7d23322657e28642655d134","readme":"## Overview\n\n- Static site generator by using React SSR (Server Side Rendering)\n- Developer Experience\n  - Dynamic `Head` component for better SEO\n  - HMR (Hot Module Replacement) when `process.env.NODE_ENV !== 'production'`\n  - Automatically reflect to the browser as soon as you save the scripts and even if styles\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/static react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"static\",\n    \"build\": \"static build\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ]\n}\n```\n\n**`static.config.js`**:\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n  },\n};\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index() {\n  return <p>Hello Static Site</p>;\n}\n```\n\nFinally,\n\n- run `npm run dev` and you'll see `Hello Static Site` in your browser.\n- run `npm run build` and you'll see the static files in the dist directory.\n\nA working examples are here:\n\n- [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n- [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n- [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n\n## Configuration (`static.config.js`)\n\nHere is the default `static.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: 'dist',\n  viewsDir: 'views',\n  port: 3000,\n  routes: {},\n  publicPaths: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `static.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `static.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `static.config.js#distDir`\n\nThe place where `react-ssr` generates static files. (default: `dist`)\n\n```js\nmodule.exports = {\n  distDir: 'out',\n};\n```\n\n### `static.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\n```js\nmodule.exports = {\n  viewsDir: 'pages',\n};\n```\n\n### `static.config.js#port`\n\nThe port of the development server. (default: `3000`)\n\n```js\nmodule.exports = {\n  port: 4000,\n};\n```\n\n### `static.config.js#routes`\n\nThe key is the route, and the value is the path from the views directory.\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n    '/login': 'auth/login',\n  },\n};\n```\n\n### `static.config.js#publicPaths`\n\nThe place where we put static files like images.\n\n```js\nmodule.exports = {\n  publicPaths: [\n    'public',\n  ],\n};\n```\n\n### `static.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = () => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/static';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.20.2-alpha.31","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-O5ssJ34vrjm8LWTEBo0ag1T12dOZUtftTIe/qbjWYaMngQmRHxkDOEdjCASNAk+fuRZM+JBINUlckK/mUEzDjA==","shasum":"4e404d50c25f3fb4cb5b1b47fad9b66ea96f29e8","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.20.2-alpha.31.tgz","fileCount":30,"unpackedSize":164664,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaUtmCRA9TVsSAnZWagAAACkQAInYkRdy2ZAVfeQRjIsB\ncwW73i/iv/7njBatlvB7sc0mO/Om+dAAlTeqbN82ZGuJedyBwhhrfi+dWiLi\nBL7z14N+0kyY+h3HI/DcLIgqi+6VNeXTeRrNxLq03jCzfQr9/KPZKJqZM5za\n/CcqVLmk1zI3hy6bHF8VDvzZWcqwqGfOVNvxBhzvvCSH7Rl0mwe0EmqLJn4c\n9Zpb0hQ2gGIOmPLz8Hk/MeKTettWKHwlL0PyK8HUZ4E1VA/z9+rr4CibKDOl\nqNVyVGBJlqy6RgAeGoU9a5gKfSkMEiwWwmJuAGI2nsWEoWKS5H9nCUhbyAW2\n6Rr6rOeWOvJkKnocMt6QGff409cjOIJacHyLT78+BIx7k0mycXWyYVcYwaX6\nCw2dTEaRBHSlXIqQwPzAYLW18j5Y7QmsLVGnFbjYslIFhVnAzvcXDeQpf+da\nAKij9kHgoa2PbYNuGs6mDxifo5CzJHAxvI8ZCsK5ChHQEn9j5YyuXgxmWGzx\nduJTnJXhVPNgUdyZxXW8srLO6+6vdoS3v7b7C2w1MI7CfgBn4QVyO03ukTVC\nTYTAe5zr2/lwSNSA4uCJIDZ/cUcr9Muosss7p7frPylXoBr1eWOf9JU/27bT\nLtovE62Bu34ubI5QBAmUZgiYdc9mKoUDnUR1brJYvPnyExXgshJOSEF+6552\nf7+I\r\n=MI5z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCdDi7iyo6DOrx7fIORKC9HD7Y0KNfRfBTJOc/+t4TlSgIhAIWMV16XKfh2UeEU/DlVOfJqGuszDBtR/9aelGviCBqy"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.20.2-alpha.31_1583958886333_0.6087173706345093"},"_hasShrinkwrap":false},"0.20.2-alpha.32":{"name":"@react-ssr/static","version":"0.20.2-alpha.32","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.8.7","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.8.3","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.7","@babel/preset-react":"^7.8.3","@babel/preset-typescript":"^7.8.3","@babel/register":"^7.8.6","@babel/runtime":"^7.8.7","@babel/runtime-corejs3":"^7.8.7","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.3","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.6.0","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.9.0","node-sass":"^4.13.1","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.2","slash":"^3.0.0","terser-webpack-plugin":"^2.3.5","unionfs":"^4.3.2","urlsafe-base64":"^1.0.0","webpack":"^4.42.0","webpack-dev-server":"^3.10.3","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-commonjs":"^11.0.2","@rollup/plugin-node-resolve":"^7.1.1","@types/cheerio":"^0.22.16","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.1.0","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.9.1","@types/node":"^13.7.7","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.23","@types/react-dom":"^16.9.5","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.7","@types/webpack-dev-server":"^3.10.0","@types/webpack-merge":"^4.1.5","cross-env":"^7.0.0","react":"^16.13.0","react-dom":"^16.13.0","rimraf":"^3.0.2","rollup":"^1.32.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-terser":"^5.2.0","typescript":"^3.8.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"e8f8204d7f260a85dafcccf7d7b145a6cf635ad2","readme":"## Overview\n\n- Static site generator by using React SSR (Server Side Rendering)\n- Developer Experience\n  - Dynamic `Head` component for better SEO\n  - HMR (Hot Module Replacement) when `process.env.NODE_ENV !== 'production'`\n  - Automatically reflect to the browser as soon as you save the scripts and even if styles\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/static react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"static\",\n    \"build\": \"static build\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ]\n}\n```\n\n**`static.config.js`**:\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n  },\n};\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index() {\n  return <p>Hello Static Site</p>;\n}\n```\n\nFinally,\n\n- run `npm run dev` and you'll see `Hello Static Site` in your browser.\n- run `npm run build` and you'll see the static files in the dist directory.\n\nA working examples are here:\n\n- [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n- [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n- [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n\n## Configuration (`static.config.js`)\n\nHere is the default `static.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: 'dist',\n  viewsDir: 'views',\n  port: 3000,\n  routes: {},\n  publicPaths: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `static.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `static.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `static.config.js#distDir`\n\nThe place where `react-ssr` generates static files. (default: `dist`)\n\n```js\nmodule.exports = {\n  distDir: 'out',\n};\n```\n\n### `static.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\n```js\nmodule.exports = {\n  viewsDir: 'pages',\n};\n```\n\n### `static.config.js#port`\n\nThe port of the development server. (default: `3000`)\n\n```js\nmodule.exports = {\n  port: 4000,\n};\n```\n\n### `static.config.js#routes`\n\nThe key is the route, and the value is the path from the views directory.\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n    '/login': 'auth/login',\n  },\n};\n```\n\n### `static.config.js#publicPaths`\n\nThe place where we put static files like images.\n\n```js\nmodule.exports = {\n  publicPaths: [\n    'public',\n  ],\n};\n```\n\n### `static.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = () => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/static';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.20.2-alpha.32","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-L1JhZMxy1foSCW4RqQvesD6bjrDJ1lh8WAqInI/lvkpHaTjtyqS6vHGTST9+8ITeN3b3glhO1JzY82YmspGomQ==","shasum":"557503f09f187972c1f577d897b0b503a2b05c93","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.20.2-alpha.32.tgz","fileCount":30,"unpackedSize":164695,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaUvlCRA9TVsSAnZWagAAlT0P/jlJYj8ZeuAvrZsvkxwL\niT6bHuUHPJlhDlOr5Nado5QSbLiURf5de1RZz9q9YlZknKBV9rKkP9Gqs8nt\nYWu1LQB9jA3cF/uGT8DDOJmd7L+kNTKPKwGCPvIEGc0TxLxrNnu8rmX+RLeG\nAM6bMrbqF98iCUoNYbo3uKA8Hch0q1dlhOTqpCcW+8lscRlWmmFWKqGrQPY3\nqn8Q7QX76HWFpElGXPrMpZ5M5FDYOOvJOI1Yrwjwm3Cy5+tgjTqHqlUJB/P1\njtuSg9RSJoIhHZJYUMrI190zPfgh2OcRNIw1BZrlb/Z+bOujQyxLb1lfemmO\nv2n1TaQ3IDlTaDZjVFWt+ouE4ybQ9R696FdEsB3z4vPJQomRCCxusBGOZUkk\nJlP8zg9F5IdNApgYY+zHp94SmOnH4/RlbxH9Vg3Db/3Lpy3Scz+l3lZtUip4\ncr/xjsH/B2MawYJ38A0KaKkqhdnu3kcmihtIKVAPLHJy5upXMJAEcimIAauW\n6XIWrKUd4dzOdAPNWoWqD0KQs+5zWZY4bCZ4pSfPAlSo6JabgO2eQHzajY7G\ndhpQRh7Vjy7e/QyEyfa/sx8enR5jOnFWBL9z0xBQbVdR1dQVeQpnfIrBWTSc\nbIY4Vn0ki5LyB2JvqmiMiGVyp2OVDYQVsU3Z8b5sADdd1NXhSpxJJsGQqigk\nSRwv\r\n=uL9H\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDNJaxiph1xjlXx5avj+uytpIQdxNMQK+gAT5GKJiW+ZQIgCYHTlYHIm8v1v0cDiX0iJ62SWhYnHj2XT0olPUwcmWY="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.20.2-alpha.32_1583959012824_0.9797909283303232"},"_hasShrinkwrap":false},"0.20.2-alpha.33":{"name":"@react-ssr/static","version":"0.20.2-alpha.33","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.8.7","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.8.3","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.7","@babel/preset-react":"^7.8.3","@babel/preset-typescript":"^7.8.3","@babel/register":"^7.8.6","@babel/runtime":"^7.8.7","@babel/runtime-corejs3":"^7.8.7","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.3","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.6.0","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.9.0","node-sass":"^4.13.1","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.2","slash":"^3.0.0","terser-webpack-plugin":"^2.3.5","unionfs":"^4.3.2","urlsafe-base64":"^1.0.0","webpack":"^4.42.0","webpack-dev-server":"^3.10.3","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-commonjs":"^11.0.2","@rollup/plugin-node-resolve":"^7.1.1","@types/cheerio":"^0.22.16","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.1.0","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.9.1","@types/node":"^13.7.7","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.23","@types/react-dom":"^16.9.5","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.7","@types/webpack-dev-server":"^3.10.0","@types/webpack-merge":"^4.1.5","cross-env":"^7.0.0","react":"^16.13.0","react-dom":"^16.13.0","rimraf":"^3.0.2","rollup":"^1.32.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-terser":"^5.2.0","typescript":"^3.8.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"af360d37590a13933faffbc710bf24ed7c50db4e","readme":"## Overview\n\n- Static site generator by using React SSR (Server Side Rendering)\n- Developer Experience\n  - Dynamic `Head` component for better SEO\n  - HMR (Hot Module Replacement) when `process.env.NODE_ENV !== 'production'`\n  - Automatically reflect to the browser as soon as you save the scripts and even if styles\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/static react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"static\",\n    \"build\": \"static build\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ]\n}\n```\n\n**`static.config.js`**:\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n  },\n};\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index() {\n  return <p>Hello Static Site</p>;\n}\n```\n\nFinally,\n\n- run `npm run dev` and you'll see `Hello Static Site` in your browser.\n- run `npm run build` and you'll see the static files in the dist directory.\n\nA working examples are here:\n\n- [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n- [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n- [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n\n## Configuration (`static.config.js`)\n\nHere is the default `static.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: 'dist',\n  viewsDir: 'views',\n  port: 3000,\n  routes: {},\n  publicPaths: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `static.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `static.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `static.config.js#distDir`\n\nThe place where `react-ssr` generates static files. (default: `dist`)\n\n```js\nmodule.exports = {\n  distDir: 'out',\n};\n```\n\n### `static.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\n```js\nmodule.exports = {\n  viewsDir: 'pages',\n};\n```\n\n### `static.config.js#port`\n\nThe port of the development server. (default: `3000`)\n\n```js\nmodule.exports = {\n  port: 4000,\n};\n```\n\n### `static.config.js#routes`\n\nThe key is the route, and the value is the path from the views directory.\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n    '/login': 'auth/login',\n  },\n};\n```\n\n### `static.config.js#publicPaths`\n\nThe place where we put static files like images.\n\n```js\nmodule.exports = {\n  publicPaths: [\n    'public',\n  ],\n};\n```\n\n### `static.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = () => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/static';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.20.2-alpha.33","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-puo7hCKTPwDBzIxvrC0OeGr94M1eF47cmFzO4sT2vcDa4IV+w6bkRYmr5OoDhB6j61vxjEn6HLRNZI7812lsHg==","shasum":"906535f9927119355846f153d28d1bad67c9322e","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.20.2-alpha.33.tgz","fileCount":30,"unpackedSize":164540,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaUw/CRA9TVsSAnZWagAAsokP/3kM89tLYBNOrCY8llOn\nJTiDi2EiRuE0uDvUdSYi5/ZYoNLLjvwIv4v8BTJve2Rdws9p9Emjl/RfiOoA\ntiAJCaDe0FB78ajGedwfEMgCDQSavq1d21SaSjwstSkJ85jdpJ/R+kSbpthc\n/xchblzbtrXgh/8DnyHAeIv1ubQ2H16btqm4OLGKhFSHPQrorT28dgxHUCKu\n0Z/xnmxgqHARtZtGcjPwwIJrnT96cW65d22Wz33w3Uz3oSb9XhAAyMmD5nkU\n7Sf8jZ5GlRLbNumbss8CwMOpgTN/XkQ/yerEAXjIP9RnnBh1LExwppjD16IT\naUkXrOK+KnBdxFZMZM7nMbkxkaDbsZOhLuf4Syf3DKfKsPek6am2sCHcRKsg\n/kAztV7IDs+Ja8uHao8IxwuoOtwZs+DQLk9cisNf5ncYCEbsjAcTIoKMoGAW\n5FfKrOYOLy2mv0VCNcGyKRKpS077cpjb/KKPlpmir+tbubIqOXoZL84Fan4h\nORO2kyCCBm7zd5NThFZKZlYBrT70yzwZQuz3iOS15iXjJXR11aK801PuX59u\nhl4Q1GADBkMRn+3oZrzM13QCWEKcXeuNSUsi6HA2jqhHH93oxUoEUOUdVmah\nJHjA0Z1Krr5BkmZ3/aMpsSHpHaZNUpCTgovmvliNLGKEKHcg6deiNbdUlxn3\n3r2n\r\n=SNQp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCFy51YyofvUiUVCznoSdWjrq1mI3X+zCcjsKtm5z7PmQIhAJsh1jgmf16sVGL2vrUbZ3bjP9eUGVeG/HQbKPjsXMpv"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.20.2-alpha.33_1583959102667_0.4518826917960699"},"_hasShrinkwrap":false},"0.21.0":{"name":"@react-ssr/static","version":"0.21.0","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.8.7","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.8.3","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.7","@babel/preset-react":"^7.8.3","@babel/preset-typescript":"^7.8.3","@babel/register":"^7.8.6","@babel/runtime":"^7.8.7","@babel/runtime-corejs3":"^7.8.7","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.3","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.6.0","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.9.0","node-sass":"^4.13.1","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.2","slash":"^3.0.0","terser-webpack-plugin":"^2.3.5","unionfs":"^4.3.2","urlsafe-base64":"^1.0.0","webpack":"^4.42.0","webpack-dev-server":"^3.10.3","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-commonjs":"^11.0.2","@rollup/plugin-node-resolve":"^7.1.1","@types/cheerio":"^0.22.16","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.1.0","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.9.1","@types/node":"^13.7.7","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.23","@types/react-dom":"^16.9.5","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.7","@types/webpack-dev-server":"^3.10.0","@types/webpack-merge":"^4.1.5","cross-env":"^7.0.0","react":"^16.13.0","react-dom":"^16.13.0","rimraf":"^3.0.2","rollup":"^1.32.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-terser":"^5.2.0","typescript":"^3.8.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"0fbc300b7a7d92fa45439b781117b5892141274f","_id":"@react-ssr/static@0.21.0","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-maDSFM5EXVoy7vP+tfrcRpRUn+0uPT83Cj9I9gagqd8RxEoY1mQLTTDt/7UuB1LCZLbBaCvwn8wGCwKWCO0Elg==","shasum":"87b5d507bf49f5d1e4763d2541bc2a0dae907c5f","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.21.0.tgz","fileCount":30,"unpackedSize":164523,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaU1pCRA9TVsSAnZWagAAAnIP/0WUJLYAvJk7aRI+zbVT\n9zPlEqji7B9MYIVc8sJYbfdoQTs7i3bNZLuDgqyP6SdTxOYoVAkQuCjW7KnW\nCqK6CKx9IccV3/wzGlV7679gAOWI18l2dEPm/S2P9QroJwNmOf25Jzyxg5rz\nnQjEN3QoMRgGNVF/vyiX5JtVDParahs6iED/nR+O6+aRSASeGC62LUhdGeHB\nWDRVnJFh8iKzKeK5gXpmPI0qGdnvvT0pnRwcbPeKQZxr4DYBW5OLHGCpveaK\n9uX3Nvt4QNT2Xo202z8h/OgMMC5s/j+cgI+P2xJeGYOg4lvtVERhvZAbuUF1\nzozkjDO+PM5DJ/LzJ7Kuh0tuhWvu0HeVxLzQfyraZBJpyYZIoeYWJXChz8qz\n/391VSw0yOmKYcg6KxbSIe79oPTSHf6QRJLPLb0FuPVxKh6Qr/AtslD3Hc2v\n3RafBcD/iIt/JE4za3hp53mVG0mz6x2GmBFSPpnweOm5l6j43MfQBBGbPKWc\n1Z4dcMr3ZzsUtQKufXIopB+vDTaOFNM9OxQKGT4lDeoovUtU4dFf+2NZVlzL\nJFzty2OTL8TDyHGcmIlPEMH8feHfFXkaz+Sl2tkr9Ayww7zI0DHSDXpyTZlu\nB+2lV2yUMIT/HwfdFOfuBu42uKp2WvD7g0YeoaT2tgVfv40zEkZOV+G/VitX\nmzJX\r\n=UjFg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFcH/otexVc/rRWquHGtkL7cr5lgYcpXZ/2ai17k97XiAiEAjrHM5Kd9sZSK7DB7aPtWeyLwfzWCHz5475HZaMmoZ6w="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.21.0_1583959401214_0.17030579409431668"},"_hasShrinkwrap":false,"deprecated":"Deprecated: please use NEXT.js (https://github.com/zeit/next.js) or express-react-views (https://github.com/reactjs/express-react-views)"},"0.21.1":{"name":"@react-ssr/static","version":"0.21.1","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.8.7","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.8.3","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.7","@babel/preset-react":"^7.8.3","@babel/preset-typescript":"^7.8.3","@babel/register":"^7.8.6","@babel/runtime":"^7.8.7","@babel/runtime-corejs3":"^7.8.7","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.3","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.6.0","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.9.0","node-sass":"^4.13.1","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.2","slash":"^3.0.0","terser-webpack-plugin":"^2.3.5","unionfs":"^4.3.2","urlsafe-base64":"^1.0.0","webpack":"^4.42.0","webpack-dev-server":"^3.10.3","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-commonjs":"^11.0.2","@rollup/plugin-node-resolve":"^7.1.1","@types/cheerio":"^0.22.16","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.1.0","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.9.1","@types/node":"^13.7.7","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.23","@types/react-dom":"^16.9.5","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.7","@types/webpack-dev-server":"^3.10.0","@types/webpack-merge":"^4.1.5","cross-env":"^7.0.0","react":"^16.13.0","react-dom":"^16.13.0","rimraf":"^3.0.2","rollup":"^1.32.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-terser":"^5.2.0","typescript":"^3.8.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"bebaa2d5212784d0644d40db060a328a8eaa0f2f","_id":"@react-ssr/static@0.21.1","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-Flkp+g8bzJo/zbGarMwROLHFbRK10zEDVTCC89SSsy8+G/2OsLwd/5HB3jIQevP4D4y6tvWcjfvFEVuvxpwSoA==","shasum":"197867d5dabf32d48678e3a197c20111952475df","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.21.1.tgz","fileCount":30,"unpackedSize":164523,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaovoCRA9TVsSAnZWagAA8S4P/0HUCobRztof2SHorIDk\nLEoora4i0iwF6PkkIjbB1tlsfP89NcIApmJQaHn50aPuWM/zdqRqulN1Bib4\ncX5z9cz+rO7lqaFy9x/Bp/QNjJ/hG1QXbsSoGMdL9MzqACk7fAkpPzavLUah\nAwGm1GwUiJuN6B7aqXKXd/sBZSR+veJvSh5bPiZltFIQIZBmIxFY/9VovHHy\n34nzozjvsIoT1dMXjv/g4efv/wuSI5hS7huCr+XsjwzSKQnBaI0VG2by2YPY\nS6HoCB3Pip4zAzU/LAY9+QcZ0zA9Cw+jvfozVswMS4Js4xXPdTJo7smzndPY\nk8aeY5nlc8YMpaB8r5M1ASd2u6yqzWJsy2SItc/WlBAOJ2fPtjM3Rzg7wbcR\nMPReqrn8WVZ/lfgGuGX/tIoFpOOcMKTHapFrG+2qNTZ39UiVw4AE6Ew+Qrto\nLxh5Bty79qc993uYYbqpqw/a0H3A8supDkuMsXcXgHEIxSEjdlVBIEXvwjW/\nJQ26JoTgG1qpf5Wac/OfsMXXtXyO0cJwOeoH9Fq1Hq7naPnH92Xt5Jb/JIoh\nfqXGjRmPOlg+LIP9ax3R+ung1t/ZEwwh0b3IZhODm8ydHjyayEQFNgA/tiC+\n3oijUrj9+jn/YtD1R1bxLT3QVYdfTmKa+UvNBO5+l4g2C+/RkYFtuLpt23Qf\nJYgz\r\n=mvaH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDhgwGQxccIdzsvkhuRnrA5DZRi5UvPnL3JpHQ1q1/jtgIhANT0RmqpOxxoFSyzGy0vGSrCbq/IopSSrqh8yVrixZiZ"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.21.1_1584040935630_0.207331122932912"},"_hasShrinkwrap":false,"deprecated":"Deprecated: please use NEXT.js (https://github.com/zeit/next.js) or express-react-views (https://github.com/reactjs/express-react-views)"},"0.21.2-alpha.3":{"name":"@react-ssr/static","version":"0.21.2-alpha.3","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.8.7","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.8.3","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.7","@babel/preset-react":"^7.8.3","@babel/preset-typescript":"^7.8.3","@babel/register":"^7.8.6","@babel/runtime":"^7.8.7","@babel/runtime-corejs3":"^7.8.7","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.3","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.6.0","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.9.0","node-sass":"^4.13.1","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.2","slash":"^3.0.0","terser-webpack-plugin":"^2.3.5","unionfs":"^4.3.2","urlsafe-base64":"^1.0.0","webpack":"^4.42.0","webpack-dev-server":"^3.10.3","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-commonjs":"^11.0.2","@rollup/plugin-node-resolve":"^7.1.1","@types/cheerio":"^0.22.16","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.1.0","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.9.1","@types/node":"^13.7.7","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.23","@types/react-dom":"^16.9.5","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.7","@types/webpack-dev-server":"^3.10.0","@types/webpack-merge":"^4.1.5","cross-env":"^7.0.0","react":"^16.13.0","react-dom":"^16.13.0","rimraf":"^3.0.2","rollup":"^1.32.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-terser":"^5.2.0","typescript":"^3.8.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"db00c754bd70ad05b4fb9f12459b7f3c8ee46369","readme":"## Overview\n\n- Static site generator by using React SSR (Server Side Rendering)\n- Developer Experience\n  - Dynamic `Head` component for better SEO\n  - HMR (Hot Module Replacement) when `process.env.NODE_ENV !== 'production'`\n  - Automatically reflect to the browser as soon as you save the scripts and even if styles\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/static react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"static\",\n    \"build\": \"static build\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ]\n}\n```\n\n**`static.config.js`**:\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n  },\n};\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index() {\n  return <p>Hello Static Site</p>;\n}\n```\n\nFinally,\n\n- run `npm run dev` and you'll see `Hello Static Site` in your browser.\n- run `npm run build` and you'll see the static files in the dist directory.\n\nA working examples are here:\n\n- [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n- [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n- [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n\n## Configuration (`static.config.js`)\n\nHere is the default `static.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: 'dist',\n  viewsDir: 'views',\n  port: 3000,\n  routes: {},\n  publicPaths: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `static.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `static.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `static.config.js#distDir`\n\nThe place where `react-ssr` generates static files. (default: `dist`)\n\n```js\nmodule.exports = {\n  distDir: 'out',\n};\n```\n\n### `static.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\n```js\nmodule.exports = {\n  viewsDir: 'pages',\n};\n```\n\n### `static.config.js#port`\n\nThe port of the development server. (default: `3000`)\n\n```js\nmodule.exports = {\n  port: 4000,\n};\n```\n\n### `static.config.js#routes`\n\nThe key is the route, and the value is the path from the views directory.\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n    '/login': 'auth/login',\n  },\n};\n```\n\n### `static.config.js#publicPaths`\n\nThe place where we put static files like images.\n\n```js\nmodule.exports = {\n  publicPaths: [\n    'public',\n  ],\n};\n```\n\n### `static.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = () => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/static';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/static@0.21.2-alpha.3","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-jzWdp2XpGxwIJ9B7dtC5EmK8O8t1m7nd9FQbA7/CakVUEg76gZE9BE+uvWDJTqrRKHWcc8XpErFaKItiE0Dn6Q==","shasum":"bbefc39cc9d127d5e1b1928bdd8ecb673bbc8984","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.21.2-alpha.3.tgz","fileCount":30,"unpackedSize":164654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeapZLCRA9TVsSAnZWagAA/CYP/3gqytwZKghs5o9tMVeY\nJBkeG43pEdV0PV1h/xGKnFHNRlhCBMhOBPMIOiD09BlLKydVE5wk5cq2lBSg\nGoSQ1WTpFTC1jARdT6pLzaJZqLtT4LN5NCxL5NYtXofY6furNa1521LnaMSW\n16LvAtgulQtrCTz1dpBRWgcet7fjZDopsym867s5M1qGqHdo09HcsSFYX9+3\nbT89iXKWYDemAhm3Wf1yBVhlnXeXzW74PgcMIoArsPwWFOWmavwClbXaUF5x\nBO2cDdegYYp/bgwluWFqQK7Q4wq5adNHOuLlRhG4cXcNcaIkQNUKpwGpqjY8\n0PO9GVFcr//UePjWU3ORnJzeHWsILJanbi+5TNgoK7G4AOpMLT627gWyDI2c\nC2n3D2vPV/G3/pDEHedCTlee8sQOBib30ldmrBRYVQmosshsGMNMqgYFMajw\nYLkWZY1HqRda3glPwpsjbxcvD38ncOhmUvHyDcyuQEfQCAFFcMnQy1UDnx8g\nnmP6wrRMJVAHWZjgEnivPVSnjS+MIgiL2ufsHP3lv0MKAA2vWavoGPKbbJh/\n7IHXgQFnTgSqcJFJ56LIdtMKMui3FXhPPFhfJO0rfoWTV8HW1+Iu56kWf4ql\nxPtMoIV5ZRNxXdhzOu022efn7E6AQMnHD/RgqH2CfLt5irT2meGGaZ/AMbp6\nqG3s\r\n=LNC5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDhRJwxi1esPMJZYMVIqNaZS/HfEtXCdVJh9nUIINkXPwIhANgoPb4r3/HO+cU/nhH4Kdmxi3uG2tBo20PLPJ+yO6qr"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.21.2-alpha.3_1584043594978_0.2820356103625472"},"_hasShrinkwrap":false},"0.21.2":{"name":"@react-ssr/static","version":"0.21.2","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.8.7","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.8.3","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.7","@babel/preset-react":"^7.8.3","@babel/preset-typescript":"^7.8.3","@babel/register":"^7.8.6","@babel/runtime":"^7.8.7","@babel/runtime-corejs3":"^7.8.7","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.3","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.6.0","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.9.0","node-sass":"^4.13.1","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.2","slash":"^3.0.0","terser-webpack-plugin":"^2.3.5","unionfs":"^4.3.2","urlsafe-base64":"^1.0.0","webpack":"^4.42.0","webpack-dev-server":"^3.10.3","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-commonjs":"^11.0.2","@rollup/plugin-node-resolve":"^7.1.1","@types/cheerio":"^0.22.16","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.1.0","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.9.1","@types/node":"^13.7.7","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.23","@types/react-dom":"^16.9.5","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.7","@types/webpack-dev-server":"^3.10.0","@types/webpack-merge":"^4.1.5","cross-env":"^7.0.0","react":"^16.13.0","react-dom":"^16.13.0","rimraf":"^3.0.2","rollup":"^1.32.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-terser":"^5.2.0","typescript":"^3.8.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"a9617070a4e6f502178fe8a81a9add4b88299459","_id":"@react-ssr/static@0.21.2","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-lBsuxZt2rrnLx5MT6qjrDN4zqmu1ypVsDahKcnECh9xTFLor1VG3uKcbSVgIi+i6Kle/cdRr2hlTeglFbblbkA==","shasum":"c223c55c5e2cc2ad2a16831764ebabdd9a5ad815","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.21.2.tgz","fileCount":30,"unpackedSize":164638,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaqOCCRA9TVsSAnZWagAAplQP/jG7uz6EZ7Gpui9jrSG/\nwoFulcb4jjMjvo/2I/mG5HNlqTM8B1aGyeO8naRf5fH/88ghL/L4FSa0RZmT\nHWW8VkDa5YZmPy6/xynCcYTaytJcvIjgChBZaQhYpaNEixTM2xkoNurgfAOI\nF8Aa+LCSb2BMYU4HOU7hkZkBOnoMHDrD0XpNo/QgImmDF34pAzPvPwlF0wyU\nJkGA6Z/Y9hFqzRJ6dJVmBD34GorMb6ZS4be6eIrLlkxHQw5PJdOODtFO5qTc\nQbnG3Ts26oxZTCTZSZk+sSkYtoFzRU8snUY5qFz7fE5rfCmV/+b+Uj4JuCOV\ne695QxeLW0b5OaXHX/mpsL72SzKwufAxKOIAQHZ7SMzb9hXAi8v3aW0cEUZW\n9HpJINkg/Q7ZOEmk/6d2C6SRT1Y+yvvqI7AIap3nU+Qa/YRONu+G0TvH01X1\nVQiDASy5jFPrVVTwJMoQg3QxRht7+HSnrxZeg2t651rm909/nCaBFNO0nhiy\ngDx6hWNPNlUeVP8Wo+QqDzuu8Qcq1DIjK/oCl140kfuc4UiR6ut4ZllSAv9k\n552Wy/0TzjrhbwBtpJERjp83SdBaEbkLXLDYfDtFLqCrd3J7/Xap5O3Lha/h\nInd2ajjDJ5K9QfPWRTICUYC6rAGOQ8H8sb5KCaPOg4sk/n0BBNaKdODe9I0t\nlO7t\r\n=0sHa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF6vo2T5CO5T8rW/5BJyh7Yv1LmDO9cWKNaeVnATiFuIAiA+Ze/1OUieV/2G2OdV8fTkjUThJgHxD9cEAWTi76NQYw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.21.2_1584046977597_0.5348536993215229"},"_hasShrinkwrap":false,"deprecated":"Deprecated: please use NEXT.js (https://github.com/zeit/next.js) or express-react-views (https://github.com/reactjs/express-react-views)"},"0.21.7":{"name":"@react-ssr/static","version":"0.21.7","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.8.7","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.8.3","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.7","@babel/preset-react":"^7.8.3","@babel/preset-typescript":"^7.8.3","@babel/register":"^7.8.6","@babel/runtime":"^7.8.7","@babel/runtime-corejs3":"^7.8.7","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.3","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.6.0","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.9.0","node-sass":"^4.13.1","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.2","slash":"^3.0.0","terser-webpack-plugin":"^2.3.5","unionfs":"^4.4.0","urlsafe-base64":"^1.0.0","webpack":"^4.42.0","webpack-dev-server":"^3.10.3","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-commonjs":"^11.0.2","@rollup/plugin-node-resolve":"^7.1.1","@types/cheerio":"^0.22.16","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.1.0","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.9.1","@types/node":"^13.7.7","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.23","@types/react-dom":"^16.9.5","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.7","@types/webpack-dev-server":"^3.10.0","@types/webpack-merge":"^4.1.5","cross-env":"^7.0.0","react":"^16.13.0","react-dom":"^16.13.0","rimraf":"^3.0.2","rollup":"^1.32.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-terser":"^5.2.0","typescript":"^3.8.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"dcca84e04e265f4be448d2c5e2ca654cc361eb91","_id":"@react-ssr/static@0.21.7","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-JJouuwGTngWe0mr/3K6Pdp0hEwMxKWS9atR0tyrrEbD2nFGFO8N1xJHKVjwSmd+XQk3FEi3/vHrng+yRWokuYA==","shasum":"a51cb739bd64bfad64c35bcc7bdc4a39070adcdb","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.21.7.tgz","fileCount":30,"unpackedSize":164588,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJebeB2CRA9TVsSAnZWagAAp9gP/1FBR8Vl31sl7e6k1n6X\nWjqieEvw5tqE5JqAPR7KNuDuqPh0lL3k66w2rxAc2W9IXJnbod/HfIBI9GP1\nGd+0mQ8Ef9/H+lsvRTOQ0Y0LJv0c9I/63wERViapEf4bXfLZeYZf7MTcXorZ\no02tiU4wa85OGHerGyTOezWQJhJ8GEAb6R8aMng1W4McB5+S6DUZo9QBVfGC\n0tkOwkfTzcKtzWf5oRjE2ma5G2i739JO6PloqKW0q8caAYzBP8q8XXpe4uXD\nwkCKvJjI6jnaTmjdWYVZcJxTALw1jR5IOATOMtoTaNX5qzlzBLmSI98bplfv\ngNCw+3X8wYUMt6HqxrLQjNxU16Y6PmaTgBsEnonzqFShuVxGcC15OKC6ip/r\nGwP50Dt9IOphtBENktlLBaCWfp8PtPaapgT2EypJSXtVSij0sG7JcEmRxO/s\n05h7NpDq+B8eKgLfn0xE8/l+ralW/r4SCNAh5YHfn8An6fBLCc2DCUUv1J9/\nraqUFpZi1CQK84ubhYT9amqa0Z1/gpSZ5jGQJuj+zYCm+tO/zHPfB7zKbIL1\nJdub2fa6u1sAtNtnXwl1iAN743LhO4Nr+SKNVGvdwHOTAAzk/sVUK66XH4Xi\nKPdSH3PflQkoQCt3e6aXTpEU63lmnxnbxtQqiTl87GvwIByaStTwvxwcPZSE\nHQa9\r\n=WQsv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDNAmd8SZCtb1D082DG6vvm5pNp5850AI2g7hkbGwKk2gIhAKhYzOqQ1XKDQ1Q9FREOt8QZ/VQ/n42w9ZvsQMyjP6Tj"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.21.7_1584259189628_0.517083977281761"},"_hasShrinkwrap":false,"deprecated":"Deprecated: please use NEXT.js (https://github.com/zeit/next.js) or express-react-views (https://github.com/reactjs/express-react-views)"},"0.21.8":{"name":"@react-ssr/static","version":"0.21.8","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.8.7","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.8.3","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.7","@babel/preset-react":"^7.8.3","@babel/preset-typescript":"^7.8.3","@babel/register":"^7.8.6","@babel/runtime":"^7.8.7","@babel/runtime-corejs3":"^7.8.7","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.3","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.2","express":"^4.17.1","fs-extra":"^8.1.0","got":"^10.6.0","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.9.0","node-sass":"^4.13.1","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.2","slash":"^3.0.0","terser-webpack-plugin":"^2.3.5","unionfs":"^4.4.0","urlsafe-base64":"^1.0.0","webpack":"^4.42.0","webpack-dev-server":"^3.10.3","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-commonjs":"^11.0.2","@rollup/plugin-node-resolve":"^7.1.1","@types/cheerio":"^0.22.16","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.1.0","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.9.1","@types/node":"^13.7.7","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.23","@types/react-dom":"^16.9.5","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.7","@types/webpack-dev-server":"^3.10.0","@types/webpack-merge":"^4.1.5","cross-env":"^7.0.0","react":"^16.13.0","react-dom":"^16.13.0","rimraf":"^3.0.2","rollup":"^2.1.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.4.0","rollup-plugin-terser":"^5.3.0","typescript":"^3.8.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"7e68def8797666530b7a3614652215ed5bf92c4c","_id":"@react-ssr/static@0.21.8","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-vp8kTYl+nZ2V5I3hS/42IaVXwz6lzg2yeYcKmtuSYYYlB6OQGn26pZOje3uZ/V3b4yqS7AZbj72umHYggvywQQ==","shasum":"73347e5de03104b9ba474d26c75c0c1db950e20f","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.21.8.tgz","fileCount":30,"unpackedSize":164596,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJec3MbCRA9TVsSAnZWagAA/uwP/086Zrs/XblcYmvNifKc\nzj4M9ugEYHcKWO+fEk1U3SCPXrrgz+WiZRlGtwcoVvxd1dfQvVICFyqqX3kG\nSJrS9iEyp+iRy3q0EfKOXgVXQv8eE1AeFOcd0NMqAE0M5yxy955Ltm0duBor\nE6PUSaex7RVFvLTA6oEscPi92WwkEuuu8elSeCR/2+0fL63Kq/I25v8aj3r0\nU3uVaxASj+dJnDBHaH3IYi2k96Q+ma05NuyD8B7ZAL5+yyopUmgqFJZFBBSS\nb09Kta+UvxNpAQvDin0xpGOvW1d8JOAS1Yco7sx/e55CgWH0sgzDsjJhS2Ar\nHGIW4dB4qCO9FnP74XOt4U5shvlBaRvq6uGoD0UxBsfHHiZDPIBQxu084qX2\nO1CBr820P/Ga1dOiFs3v9qlTYNXYdTFF9C1HU2cA6XufWC17JpjYNPzADPyf\nptqcLvZIhCuTp9IHAFeQhVmO4Yo5u7Pbn5pW0R5UBAGA6LSXVVdp4dLwG5Os\nFdzmQxCwgdOmOv1j/YJ1REhfw3Y7Mi4UmVyzSKYPRCqq25HbILJeY8+T6ubK\nB/Huj3dDSk7iTXHjFqEwmCYYK1m2UqqStI1AF5rfMzyfDpzJrve/wWMgA6UU\nysnR+j51a5bz7AfyUFiBk+EVK76AMnG1gyRCLcKY4e2zL85AZh9ndEPzSXGO\n/ZY4\r\n=gpvk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBV3PgjUaHH37nLMze1ihPB2RaxK1c8p/G2N+TptYknMAiBP9yzF83KIn8O9IsEj6SkgY/ia87C1u+pIZQk30pjYuA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.21.8_1584624411457_0.6238938784374035"},"_hasShrinkwrap":false,"deprecated":"Deprecated: please use NEXT.js (https://github.com/zeit/next.js) or express-react-views (https://github.com/reactjs/express-react-views)"},"0.21.13":{"name":"@react-ssr/static","version":"0.21.13","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.9.0","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.9.0","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.9.0","@babel/preset-env":"^7.9.0","@babel/preset-react":"^7.9.1","@babel/preset-typescript":"^7.9.0","@babel/register":"^7.9.0","@babel/runtime":"^7.9.2","@babel/runtime-corejs3":"^7.9.2","babel-loader":"^8.1.0","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.3","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.2","express":"^4.17.1","fs-extra":"^9.0.0","got":"^10.6.0","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.9.0","node-sass":"^4.13.1","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.2","slash":"^3.0.0","terser-webpack-plugin":"^2.3.5","unionfs":"^4.4.0","urlsafe-base64":"^1.0.0","webpack":"^4.42.0","webpack-dev-server":"^3.10.3","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-commonjs":"^11.0.2","@rollup/plugin-node-resolve":"^7.1.1","@types/cheerio":"^0.22.16","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.1.0","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.9.1","@types/node":"^13.7.7","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.23","@types/react-dom":"^16.9.5","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.7","@types/webpack-dev-server":"^3.10.0","@types/webpack-merge":"^4.1.5","cross-env":"^7.0.0","react":"^16.13.0","react-dom":"^16.13.0","rimraf":"^3.0.2","rollup":"^2.1.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.4.0","rollup-plugin-terser":"^5.3.0","typescript":"^3.8.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"e3d9be1eb41b8972cc79bcb16c03311b6df3344e","_id":"@react-ssr/static@0.21.13","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-2oKftuMI9z9l4DVviBPOvwou9kYhcuVTGYIUKmQniUIiL64myrqCPnUNze6B+9aculIwUK4ReqPx2kaLY5fAow==","shasum":"29c38031af5ccdbc3ce436e47c45ee43e134cf4e","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.21.13.tgz","fileCount":30,"unpackedSize":172329,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJed7MUCRA9TVsSAnZWagAA7xUP+wccv/2HRUmcMAIWrSB2\nINXqOTTSJ44cQCVIdihXjBxy9OlPGgajiV54NDtzJGHRcsXaCkTq0LPQCfH0\nvQ3sE26ZuqfCKXcjbGYk/6RjBADxU6hAtzeSp7qB3eGblTktFoOSxt9hG2kb\ngou6fiJmuBqQYwkdRzPAkFuEKpyHfXlVdFlQJM2/CFWKG2aXQJhRMceJOzP3\nlqnge6EbxkxBwVVm5cDEWaY9VbAkTsvnCT4ItGX7j0VgYi2EEGl49vcTrWHb\nWTz0jDJqalfEh6eIrvLHlKIpilxp+8gUbY1Nym3kRpAcZRiqeb2v49nByRGu\nXnINY5ZY9ibngRfWOamo9AdquG5BHMBLAmOb5ofr8+VahMiCaae1/EXeBxH1\nk/X/ORtzn4fMGAPlWzWA+qU4cp0Mj/K90cadjvGVuBPAU+fp04MbyLj8eWDh\nYSW/PL/N06SMvJ9iWD4pPHGXaLnAFSOwAmpbjFecFdmgobMQNpqM4CtSLru/\nIEtSF6+mJn2O14AM5OA8H72QNRc1d1czFYM8FxetLnnirEvD9uTnF3GW8i2V\ni81p8A9AElYUKJK/zT30pBwSejsqWUZVYqGDyxjt/XP+qsPXLgxo7OF3EeAl\nT5Fv6cjo2Jth4iZo0Vlo6DeOR7gelOF8FX3Bumbr1rKIDULHeNsnTQT/LkV0\n87ee\r\n=FKCn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDjrEhiSzBXw7WMoZbO6YHubBc/W8xX8EOzyr1+9Z+HQAIhAL22n7S2PfOx/UZNEKC2HOZgOowcrAe6Dkww0A5tPI6d"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.21.13_1584902932140_0.02449839804628362"},"_hasShrinkwrap":false,"deprecated":"Deprecated: please use NEXT.js (https://github.com/zeit/next.js) or express-react-views (https://github.com/reactjs/express-react-views)"},"0.21.14":{"name":"@react-ssr/static","version":"0.21.14","description":"Yet another React static site generator","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","bin":{"static":"dist/static.js"},"scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.9.0","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.9.0","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.9.0","@babel/preset-env":"^7.9.0","@babel/preset-react":"^7.9.4","@babel/preset-typescript":"^7.9.0","@babel/register":"^7.9.0","@babel/runtime":"^7.9.2","@babel/runtime-corejs3":"^7.9.2","babel-loader":"^8.1.0","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.3","babel-plugin-transform-react-remove-prop-types":"^0.4.24","cheerio":"^1.0.0-rc.3","cross-spawn":"^7.0.1","css-loader":"^3.4.2","express":"^4.17.1","fs-extra":"^9.0.0","got":"^10.6.0","lodash.escaperegexp":"^4.1.2","lz-string":"^1.4.4","memory-fs":"^0.5.0","mini-css-extract-plugin":"^0.9.0","node-sass":"^4.13.1","optimize-css-assets-webpack-plugin":"^5.0.3","recursive-readdir":"^2.2.2","sass-loader":"^8.0.2","slash":"^3.0.0","terser-webpack-plugin":"^2.3.5","unionfs":"^4.4.0","urlsafe-base64":"^1.0.0","webpack":"^4.42.1","webpack-dev-server":"^3.10.3","webpack-merge":"^4.2.2"},"devDependencies":{"@rollup/plugin-commonjs":"^11.0.2","@rollup/plugin-node-resolve":"^7.1.1","@types/cheerio":"^0.22.16","@types/cross-spawn":"^6.0.1","@types/express":"^4.17.2","@types/fs-extra":"^8.1.0","@types/lz-string":"^1.3.33","@types/memory-fs":"^0.3.2","@types/mini-css-extract-plugin":"^0.9.1","@types/node":"^13.7.7","@types/optimize-css-assets-webpack-plugin":"^5.0.1","@types/react":"^16.9.23","@types/react-dom":"^16.9.5","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^2.2.0","@types/urlsafe-base64":"^1.0.28","@types/webpack":"^4.41.7","@types/webpack-dev-server":"^3.10.0","@types/webpack-merge":"^4.1.5","cross-env":"^7.0.2","react":"^16.13.0","react-dom":"^16.13.0","rimraf":"^3.0.2","rollup":"^2.2.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.4.0","rollup-plugin-terser":"^5.3.0","typescript":"^3.8.3"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"e4399255389d9eaabcd96e3d8ee7d3690126bbe2","_id":"@react-ssr/static@0.21.14","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-84YDrEZrXtLcJVlNfRz2eWES5+B3YzNltD9nmOsfVNogkUr5z/c28nAX5cnL0fahzYkNxFoTj/lw5Axq8RpMLw==","shasum":"d13b239a55d14d7745fc27a70a2a9976c1bca12d","tarball":"https://registry.npmjs.org/@react-ssr/static/-/static-0.21.14.tgz","fileCount":30,"unpackedSize":172329,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJefHieCRA9TVsSAnZWagAAuroP/iJqSu22rt73VRdwXvoX\noZn/3UhdhAlGexim/8BX3O4RUCFbLraihFy71grgGBGFEsvSOHCT1bzwxzKv\nrWSzp60UhHQIJv7mDP7SRosiXW+qWkm6IhmJlCNer3YsiKqXHP9BaaWlgPrX\ntbS4nXzqhJSRJz9mAt2bpYSbii8JysHYXijG/lyyhyBibXmyuVkAgmjTGgCF\nN5Ag3PHKS+rAbw+CUC/lta4Pez+FAIiL4ncjQRgMx6+/Htmt52RsicWxbxa4\nh0AzfFFXSSJI3/hp1YcRHccsTzmDoKirIwVpMzyRVwDY9NsUdawBKR3M6/ys\nOYYrIY6G/qTv9LcVhZ7Nq7zN3kajCwGodQ3b1ah5nkL5SaBCYvFdQuReb99D\n76inEdMzHqTPxABD7PqDnLiCUam5b7EBn9+c8XSNteYB/iCpBdBuEEeXJ+lS\n/Ge3kISi4jWwd7Px7I5XVkpMNBcjAMXi4GKJUnzmYgcEAlr+5E81/e3p/JCS\nhzwxo2joZvj9GSrWlIBjGvYRMKfd5283nkuAlzQ42Yrcb0zltKHgwXCl56/y\nOHscztzHC0uFfs7J6x62ECiMm05y0CuwJ4ean/Y+pkkMIrzjpJ1ri7PnLLXU\nd5mEQnju5Vlpmxrayr9Ds6RD1Wk6jQN4IS8gmizi2ly1RRlvNH6KprX71S48\nDF5d\r\n=mjvP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC3qoa6Le8wFkLNMXRw9fuirDYbQKR3/jXp5b2xeRP8jAIhAP5TwtazAeVXXe4E2zXyHuZ6TQzP2V48BkLUsV/Uf1xO"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/static_0.21.14_1585215646423_0.6826640047351504"},"_hasShrinkwrap":false,"deprecated":"Deprecated: please use NEXT.js (https://github.com/zeit/next.js) or express-react-views (https://github.com/reactjs/express-react-views)"}},"time":{"created":"2019-12-17T04:59:50.039Z","0.19.0-alpha.5":"2019-12-17T04:59:50.441Z","modified":"2022-04-06T18:29:02.931Z","0.19.0-alpha.6":"2019-12-17T05:07:16.623Z","0.19.0-alpha.7":"2019-12-17T05:18:40.014Z","0.19.0-alpha.8":"2019-12-17T05:20:57.506Z","0.19.0-alpha.9":"2019-12-17T05:22:53.527Z","0.19.0-alpha.10":"2019-12-17T05:24:11.352Z","0.19.0-alpha.11":"2019-12-17T05:28:37.005Z","0.19.0-alpha.12":"2019-12-17T05:34:28.867Z","0.19.0-alpha.13":"2019-12-17T05:36:06.294Z","0.19.0-alpha.14":"2019-12-17T05:39:41.519Z","0.19.0-alpha.15":"2019-12-17T05:46:40.706Z","0.19.0-alpha.16":"2019-12-17T05:48:54.074Z","0.19.0-alpha.17":"2019-12-17T05:51:17.277Z","0.19.0-alpha.18":"2019-12-17T06:07:30.352Z","0.19.0-alpha.20":"2019-12-17T08:38:50.202Z","0.19.0-alpha.21":"2019-12-17T08:42:45.531Z","0.19.0-alpha.22":"2019-12-17T08:47:18.928Z","0.19.0-alpha.23":"2019-12-17T09:45:57.265Z","0.19.0-alpha.25":"2019-12-17T10:03:46.096Z","0.19.0-alpha.26":"2019-12-17T10:05:48.010Z","0.19.0-alpha.27":"2019-12-17T10:06:26.116Z","0.19.0-alpha.28":"2019-12-17T10:10:53.953Z","0.19.0-alpha.29":"2019-12-17T10:13:52.510Z","0.19.0-alpha.30":"2019-12-17T10:17:04.552Z","0.19.0-alpha.31":"2019-12-17T10:21:09.828Z","0.19.0-alpha.32":"2019-12-17T10:25:02.746Z","0.19.0-alpha.33":"2019-12-17T10:30:29.965Z","0.19.0-alpha.34":"2019-12-17T10:33:13.807Z","0.19.0-alpha.35":"2019-12-17T11:20:36.345Z","0.19.0-alpha.36":"2019-12-17T11:23:58.146Z","0.19.0":"2019-12-17T12:27:45.653Z","0.19.1-alpha.4":"2019-12-17T22:32:39.129Z","0.19.1-alpha.5":"2019-12-17T23:09:37.419Z","0.19.1-alpha.6":"2019-12-17T23:16:39.364Z","0.19.1":"2019-12-17T23:55:29.424Z","0.19.2":"2019-12-18T03:23:50.212Z","0.19.3":"2019-12-18T08:16:38.715Z","0.19.4-alpha.1":"2019-12-18T20:02:54.191Z","0.19.4-alpha.3":"2019-12-18T20:14:33.768Z","0.19.4-alpha.4":"2019-12-18T20:15:58.607Z","0.19.4-alpha.5":"2019-12-18T20:17:29.510Z","0.19.4-alpha.7":"2019-12-18T20:25:17.229Z","0.19.4-alpha.8":"2019-12-18T20:29:16.154Z","0.19.4-alpha.9":"2019-12-18T20:31:16.120Z","0.19.4-alpha.10":"2019-12-18T20:32:48.169Z","0.19.4":"2019-12-18T20:37:46.233Z","0.19.5":"2019-12-18T20:44:49.329Z","0.19.6":"2019-12-20T13:52:55.754Z","0.19.7-alpha.0":"2019-12-20T14:10:10.391Z","0.19.7-alpha.3":"2019-12-20T14:13:14.259Z","0.19.7":"2019-12-20T14:14:40.395Z","0.19.9":"2020-01-15T05:32:04.803Z","0.19.11":"2020-03-02T14:03:58.068Z","0.20.0":"2020-03-02T20:40:21.093Z","0.20.1":"2020-03-11T18:38:41.372Z","0.20.2-alpha.0":"2020-03-11T18:43:11.328Z","0.20.2-alpha.1":"2020-03-11T18:56:48.332Z","0.20.2-alpha.2":"2020-03-11T18:59:25.521Z","0.20.2-alpha.3":"2020-03-11T19:01:44.547Z","0.20.2-alpha.4":"2020-03-11T19:04:13.879Z","0.20.2-alpha.5":"2020-03-11T19:09:51.751Z","0.20.2-alpha.6":"2020-03-11T19:16:04.776Z","0.20.2-alpha.7":"2020-03-11T19:21:14.662Z","0.20.2-alpha.8":"2020-03-11T19:23:12.640Z","0.20.2-alpha.9":"2020-03-11T19:25:40.653Z","0.20.2-alpha.10":"2020-03-11T19:29:59.047Z","0.20.2-alpha.11":"2020-03-11T19:30:55.547Z","0.20.2-alpha.12":"2020-03-11T19:33:59.460Z","0.20.2-alpha.13":"2020-03-11T19:36:53.219Z","0.20.2-alpha.14":"2020-03-11T19:39:08.415Z","0.20.2-alpha.15":"2020-03-11T19:41:46.853Z","0.20.2-alpha.16":"2020-03-11T19:44:19.626Z","0.20.2-alpha.17":"2020-03-11T19:45:58.830Z","0.20.2-alpha.18":"2020-03-11T19:49:02.886Z","0.20.2-alpha.19":"2020-03-11T19:52:09.557Z","0.20.2-alpha.20":"2020-03-11T19:57:23.338Z","0.20.2-alpha.21":"2020-03-11T19:58:22.264Z","0.20.2-alpha.22":"2020-03-11T19:59:08.650Z","0.20.2-alpha.23":"2020-03-11T20:03:36.078Z","0.20.2-alpha.24":"2020-03-11T20:05:26.821Z","0.20.2-alpha.25":"2020-03-11T20:07:16.269Z","0.20.2-alpha.27":"2020-03-11T20:09:20.078Z","0.20.2-alpha.28":"2020-03-11T20:12:43.415Z","0.20.2-alpha.30":"2020-03-11T20:34:18.918Z","0.20.2-alpha.31":"2020-03-11T20:34:46.460Z","0.20.2-alpha.32":"2020-03-11T20:36:52.955Z","0.20.2-alpha.33":"2020-03-11T20:38:22.840Z","0.21.0":"2020-03-11T20:43:21.364Z","0.21.1":"2020-03-12T19:22:15.808Z","0.21.2-alpha.3":"2020-03-12T20:06:35.192Z","0.21.2":"2020-03-12T21:02:57.698Z","0.21.7":"2020-03-15T07:59:49.792Z","0.21.8":"2020-03-19T13:26:51.666Z","0.21.13":"2020-03-22T18:48:52.292Z","0.21.14":"2020-03-26T09:40:46.565Z"},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"description":"Yet another React static site generator","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/static/README.md","keywords":["react","static","static-site-generator","server-side-rendering","ssr","view-engine","view-template-engine"],"repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"license":"MIT","readme":"## Overview\n\n- Static site generator by using React SSR (Server Side Rendering)\n- Developer Experience\n  - Dynamic `Head` component for better SEO\n  - HMR (Hot Module Replacement) when `process.env.NODE_ENV !== 'production'`\n  - Automatically reflect to the browser as soon as you save the scripts and even if styles\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/static react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"static\",\n    \"build\": \"static build\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ]\n}\n```\n\n**`static.config.js`**:\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n  },\n};\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index() {\n  return <p>Hello Static Site</p>;\n}\n```\n\nFinally,\n\n- run `npm run dev` and you'll see `Hello Static Site` in your browser.\n- run `npm run build` and you'll see the static files in the dist directory.\n\nA working examples are here:\n\n- [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n- [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n- [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n\n## Configuration (`static.config.js`)\n\nHere is the default `static.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: 'dist',\n  viewsDir: 'views',\n  port: 3000,\n  routes: {},\n  publicPaths: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `static.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `static.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `static.config.js#distDir`\n\nThe place where `react-ssr` generates static files. (default: `dist`)\n\n```js\nmodule.exports = {\n  distDir: 'out',\n};\n```\n\n### `static.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\n```js\nmodule.exports = {\n  viewsDir: 'pages',\n};\n```\n\n### `static.config.js#port`\n\nThe port of the development server. (default: `3000`)\n\n```js\nmodule.exports = {\n  port: 4000,\n};\n```\n\n### `static.config.js#routes`\n\nThe key is the route, and the value is the path from the views directory.\n\n```js\nmodule.exports = {\n  routes: {\n    '/': 'index',\n    '/login': 'auth/login',\n  },\n};\n```\n\n### `static.config.js#publicPaths`\n\nThe place where we put static files like images.\n\n```js\nmodule.exports = {\n  publicPaths: [\n    'public',\n  ],\n};\n```\n\n### `static.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = () => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/static';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `static.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/static';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/static/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md"}