A very simple starter project for using React, TypeScript and Webpack.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Initial commit Feb 3, 2019
.gitignore Initial commit Feb 3, 2019
LICENSE.md Update and rename LICENSE to LICENSE.md Feb 3, 2019
README.md
package.json Initial commit Feb 3, 2019
tsconfig.json
webpack.config.js Initial commit Feb 3, 2019

README.md

React TypeScript Webpack Starter

A very simple starter project for using React,TypeScript and Webpack.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Installing

Note: Webpack is installed locally as recommended by the official Webpack documentation. It makes it easy to upgrade projects individually when breaking changes are introduced.

Once you have forked and cloned off the project. Install the project dependencies by running:

npm install

Development

We will utilise webpack-dev-server to run a dev server. It serves webpack projects and updates the browser automatically with any changes we make in our code.

You can run webpack-dev-server --mode development

Alternatively utilising our npm scripts inside our package.json

npm run dev

Production

You can run webpack --mode production or the below using our npm scripts.

npm run build

Built With

  • React - JavaScript library for building user interfaces.
  • TypeScript - TypeScript is a superset of JavaScript that compiles to clean JavaScript.
  • Webpack - App bundler for JavaScript.

Required for Webpack and TypeScript

Webpack Plugins

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

  • Saurabh Pati - for his detailed tutorial on setting up React & TypeScript with Webpack

Additional Notes

  • Terser - used by Webpack for compiling for production recently rolled out a breaking change. As a temporary workaround, I've installed an earlier version of "terser": "^3.14.1" as this works. Read more on the issue here.