New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

parcel-react-ssr

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parcel-react-ssr

Example of SSR with React and ParcelJS

  • 0.3.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-83.33%
Maintainers
1
Weekly downloads
 
Created
Source

Example of server-side rendering with React.js and ParcelJS

Complete example of a React.js with server-side rendering and bundled with ParcelJS. It includes:

  • React.js - UI library
  • React Helmet - SEO library - Manage your and page title
  • React Router - URL Router
  • Apollo Client - GraphQL client
  • Communicate with GitHub GraphQL API as an example

Development

In development, you don't have server-side rendering. All you need to do is npm start.

Production

To run into production, you need to build first and then you can run the app using the express server.

  • npm run build
  • node server

How is this working?

There is two build: one for the browser using Parcel.js and one for Node.js using BabelJS.

The parcel build is in dist/client and is a regular build just like you would do without server-side rendering.

The Node.js build is in dist/client and is only transformed through BabelJS. It uses a babel plugin to ignore the file extensions that should not be executed through the server. You can add your own!

FAQs

Package last updated on 14 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc