Skip to content

harakeke-2019/boilerplate-react-webpack

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A starter webpack project for React

This is a starter project that uses webpack to transpile and bundle ES6 React code. To use, consider these steps:

  • Fork this repo
  • Rename your repo according to the app you're building
git clone https://github.com/[your-account]/[your-app].git
cd [your-app] && yarn

To start the development server with a watcher that rebuilds your code, run yarn dev. The assets built by webpack are placed in server/public. This folder is defined as a static folder in an Express.js server that can be started with npm run server.

Additional components should be placed in client/components.

Separate client/server

The boilerplate is also set up to host the client using webpack-dev-server with hot module reloading etc. To use this method, in one terminal run:

yarn client

and in the other:

yarn server

The client will be available on http://localhost:8080 and the server on http://localhost:3000. Note that you will still need to manage CORS between the two, as they are on different ports.

About

A webpack React starter solution

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 89.5%
  • HTML 10.5%