Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
S

simple_webpack_boilerplate

> 编程语言
Open source

Ever wondered how you could set up a React project from scratch? This is the repo for you! I have also written up a blog tutorial to follow along.

199 stars0 likes0 views
WebsiteGitHub

About

Ever wondered how you could set up a React project from scratch? This is the repo for you! I have also written up a blog tutorial to follow along.

Simple webpack boilerplate

A ready to use simple webpack boilerplate.

Instructions

  1. Clone this repo
  2. Run npm install
  3. Run npm start, localhost:8080 will open up in your default browser

If you prefer to install things yourself you can follow the instructions below

  1. Run npm init and type your answers to the questions or you can run npm init -y to say yes to every question - you will get default settings
  2. Install the following dependencies:
bash
npm i react react-dom -S
  1. Install the following dev dependencies:
bash
npm i babel-core babel-loader babel-preset-env babel-preset-react css-loader html-webpack-plugin style-loader webpack webpack-cli webpack-dev-server -D
  1. Update your scripts to the following:
"start": "webpack-dev-server --mode development --open",
"build": "webpack --mode production"
  1. Create .babelrc file with the following configurations:
{
  "presets": ["env", "react"]
}
  1. Create webpack.config.js file with the following configurations:
…
  1. Create src folder with index.js and index.html file.
  2. index.js should have:
import React from "react";
import ReactDOM from "react-dom";

const Index = () => {
  return 
;
};

ReactDOM.render(, document.getElementById("index"));
  1. index.html should have:

  
  
  
  React and Webpack4

  
  1. Create .gitignore file and input /node_modules/ and /dist.

Issues· 4 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

JavaScript

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言