Open tylerrrkd opened 5 years ago
请问解决了吗?
请问解决了吗?
没有噢 @caihaihong cai
@tylerrrkd @caihaihong
I found a solution for Webpack 5 and Babel 7, here is the detail:
hotOnly
to true
in the Webpack dev server.
// webpack.config.js
devServer: {
hotOnly: true,
},
require
but use import
instead:
import router from './router';
app.router(router)
Hope it helps.
.babelrc
配置如下webpack.config.js
版本信息
附
dva
版本不敢随意乱动安装的依赖同
npm
插件页介绍一样npm install babel-plugin-dva-hmr redbox-react@1.x --save-dev
@sorrycc 大佬有时间帮忙看看,谢谢您!