{"id":15192600,"url":"https://github.com/webpack/react-webpack-server-side-example","last_synced_at":"2025-12-16T14:35:44.322Z","repository":{"id":17309913,"uuid":"20080623","full_name":"webpack/react-webpack-server-side-example","owner":"webpack","description":"Example of an react application with webpack including server-side rendering.","archived":true,"fork":false,"pushed_at":"2016-09-19T07:42:20.000Z","size":152,"stargazers_count":460,"open_issues_count":9,"forks_count":70,"subscribers_count":21,"default_branch":"master","last_synced_at":"2024-10-30T00:58:48.698Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/webpack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-22T23:34:00.000Z","updated_at":"2024-03-01T00:51:27.000Z","dependencies_parsed_at":"2022-08-22T18:31:07.361Z","dependency_job_id":null,"html_url":"https://github.com/webpack/react-webpack-server-side-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webpack%2Freact-webpack-server-side-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webpack%2Freact-webpack-server-side-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webpack%2Freact-webpack-server-side-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webpack%2Freact-webpack-server-side-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webpack","download_url":"https://codeload.github.com/webpack/react-webpack-server-side-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234774912,"owners_count":18884516,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-27T22:00:16.640Z","updated_at":"2025-10-02T08:30:49.779Z","avatar_url":"https://github.com/webpack.png","language":"JavaScript","readme":"# react-webpack-server-side-example\n\nExample of an react application with webpack including server-side rendering.\n\nThis is not for the normal user. This example is meant as inspiration to develop an framework that can do server-side rendering of react with webpack. You shouldn't use the code, only the idea.\n\n## Overview\n\nwebpack compile with two separate configurations: One for the browser bundle and one for the react application for server-side rendering. The server-side bundle can be required in other node.js code to build the pre-rendered HTML.\n\n## Features\n\n* Same react code (`app/Application.js`) run on server and on client\n* In both cases the code is compiled with webpack\n  * Supports loaders i. e. file-loader for assets\n* The server-side compilation collects styles and include them in the pre-rendered HTML\n  * This avoids FOUC of the pre-rendered HTML\n* browser build includes a hash in url for caching\n\n## Usage\n\n``` text\nnpm start\n```\n\nRun the 2 steps:\n\n1. Compile the browser bundle and the server-side bundle. It also stores stats from the browser bundle as json file.\n2. Starts a server. The server requires the server-side bundle, which generates HTML for every request. It also reads the filename of the browser bundle to insert the `\u003cscript\u003e`-tag.\n\n### Production\n\n``` text\nnpm run production\n```\n\nThis compiles production versions for the browser and server-side bundles. It also minimizes javascript and css.\n\n## License\n\nNone. Don't copy the code, only use the idea.\n\nCopyright 2014 Tobias Koppers","funding_links":[],"categories":["Awesome React"],"sub_categories":["Tools"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebpack%2Freact-webpack-server-side-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebpack%2Freact-webpack-server-side-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebpack%2Freact-webpack-server-side-example/lists"}