Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example missing serving of static files #7

Open
sedubois opened this issue Oct 24, 2016 · 2 comments
Open

Example missing serving of static files #7

sedubois opened this issue Oct 24, 2016 · 2 comments

Comments

@sedubois
Copy link

sedubois commented Oct 24, 2016

I just discovered this project which looks quite promising to enable SSR with almost no configuration overhead in my React projects. So I went to look at the example, which runs fine and generates static files as promised, but then these files are apparently not used when running npm start. It would be nice to have a minimal example showcasing how these generated files are actually combined with the rest of the development and deployment experience.

@sedubois
Copy link
Author

sedubois commented Oct 24, 2016

If appropriate, I'd like to understand how to integrate this into react-boilerplate.

@mvanlonden
Copy link

mvanlonden commented May 19, 2017

@sedubois FWIW I've added prep to create-react-app using the following code in the scripts portion of the package.json.

"build": "react-scripts build && npm run prerender",
"prerender": "babel src/prerender/index.js -o src/prerender/prep.js && prep -c src/prerender/prep.js build",

Babel step is optional but required if using async / await

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants