Skip to content

Latest commit

 

History

History
124 lines (84 loc) · 4.93 KB

README.md

File metadata and controls

124 lines (84 loc) · 4.93 KB

Typescript Webpack Boilerplate

A webpack 5 boilerplate for Typescript using babel

Usage

Clone the repository

git clone [email protected]:dennisja/webpack-typescript-boilerplate.git

Install dependencies

  • With yarn:-
yarn
  • With npm:-
npm i

Running the project

  • With yarn:-
yarn start
  • With npm:-
npm start

Build for production

  • With yarn:-
yarn build
  • With npm:-
npm run build

Tools used

  • Webpack - code and asset bundling
  • Babel - Transpiling Typescript and JavaScript
  • Typescript - Type information
  • Yarn - Package manager

Features supported

  • Loading scss and css files
  • Loading images, SVGs and fonts
  • Loading js, jsx, ts, tsx, and json source code files
  • Reading scoped/prefixed environment variables. Can be from .env files or all environment variables.
  • Linting
  • Code formatting
  • Using absolute imports

If you want to scope your environment variables. You will have to provide the prefix through the scope variable to the getEnvironmentVariables function call here

Dependencies

Webpack

Webpack loaders

Webpack plugins

Babel

Linting and Formatting