rashomon511 / react-whole-barrels Goto Github PK
View Code? Open in Web Editor NEWwebapck + react + react-router +dva + es6 + less + antd 实现的脚手架 👌👌
webapck + react + react-router +dva + es6 + less + antd 实现的脚手架 👌👌
魑魅魍魉Rashomon,您好。
我是在掘金社区上看到您所写的文章《利用webpack搭建脚手架一套完整流程》。非常感谢您如此详细地教学分享,我自己按照您的流程写下来后也收益良多。
但我遇到了HMR无法起作用的问题(无论是webpack-dev-server还是express启动的服务器),我完全按照您的流程搭建,并阅读了您所写的另一篇文章《利用webpack搭建脚手架一套完整流程》,也尝试了其中的办法,发现并不能很好地实现HMR,修改后还是只是自动刷新,也就是热重载,据我所学,如果使用webpack-dev-server的话,这个应该是配置devServer中的hot : true就可以实现。
我之前使用的时候,另外使用了一个叫做react-hot-loader的插件,是可以实现热更新的。但我目前没太想好如何方便地与Dva的写法搭配起来。
我还clone了您的这个这个仓库,并在本地跑,也无法实现热更新。
不知您是否遇到了这个问题?
启动的时候报了如下错误,请问一下怎么解决
Error: ENOENT: no such file or directory, scandir 'D:\code\react_dome\16.8.7\React-Whole-barrels-master\dll'
at Object.readdirSync (node:fs:1380:3)
at Object. (D:\code\react_dome\16.8.7\React-Whole-barrels-master\build\webpack.common.js:24:18)
at Module._compile (node:internal/modules/cjs/loader:1095:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1124:10)
at Module.load (node:internal/modules/cjs/loader:975:32)
at Function.Module._load (node:internal/modules/cjs/loader:816:12)
at Module.require (node:internal/modules/cjs/loader:999:19)
at require (node:internal/modules/cjs/helpers:93:18)
at Object. (D:\code\react_dome\16.8.7\React-Whole-barrels-master\build\webpack.dev.js:5:22)
at Module._compile (node:internal/modules/cjs/loader:1095:14) {
errno: -4058,
syscall: 'scandir',
code: 'ENOENT',
path: 'D:\code\react_dome\16.8.7\React-Whole-barrels-master\dll'
}
Error: webpack.optimize.CommonsChunkPlugin has been removed, please use config.optimization.splitChunks instead.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.