百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
S

simple_webpack_boilerplate

> 编程语言
开源

你有没有想过如何从头开始设置一个 React 项目?这正是你需要的仓库!我还写了一个博客教程供你参考。

199 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

你有没有想过如何从头开始设置一个 React 项目?这正是你需要的仓库!我还写了一个博客教程供你参考。

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 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

JavaScript

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

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