lorainwings / react-webpack5-boilerplate

A webpack 5 boilerplate with React TypeScript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

React Webpack5 Boilerplate

Webpack5 boilerplate using React, TypeScript, Babel 7, PostCSS and Sass with a hot dev server and an optimized production build. Babel compiles TypeScript to ES5.

The Webpack plugin eslint-webpack-plugin does the type checking. It is possible to use both React with JS in .jsx files and React with TS in .tsx files. Except from the main index.js and the webpack files the modules are ready in jsx and tsx.

Usage

Installing

  • Make sure you have a new version of Node installed
  • Download the code by zip or fork
  • Run the command pnpm install by the command promt

Development server

  • pnpm run start
  • You can view the development server at localhost:8080.

Production build

  • pnpm run build

To view the build use http-server

  • pnpm run prod

Features

Dependencies

React

  • react - React is a JavaScript library for creating user interfaces. For creating React components.
  • react-dom - This package serves as the entry point to the DOM and server renderers for React.
  • react-router-dom - This package serves as DOM for React Router.

Babel

devDependencies

TypeScript

webpack

Loaders

Plugins

Author

  • Lorain

License

This project is open source and available under the MIT License.

About

A webpack 5 boilerplate with React TypeScript

License:MIT License


Languages

Language:TypeScript 72.1%Language:JavaScript 22.1%Language:HTML 4.0%Language:SCSS 1.4%Language:Shell 0.3%