[英]writeToDisk with create-react-app not displaying work files
I am trying to configure webpack in my react app so that during development, the files are visible in the dist
folder (or wherever).我正在尝试在我的 React 应用程序中配置 webpack,以便在开发过程中,文件在
dist
文件夹(或任何地方)中可见。
So I tried react-app-rewired
with the following config所以我尝试使用以下配置进行
react-app-rewired
module.exports = function override(config, env) {
config.devServer = {
devMiddleware: {
writeToDisk: true
}
}
return config;
}
But it doesn't seem to work.但这似乎不起作用。 I've been looking for how to make
writeToDisk
work, and it seems to have changed at some point, because I can't find anything online that works.我一直在寻找如何使
writeToDisk
工作,它似乎在某个时候发生了变化,因为我在网上找不到任何可用的东西。
How can I get writeToDisk
to work so that it writes the hot-reload files to a visible folder when running react-scripts start
?我怎样才能让
writeToDisk
工作,以便在运行react-scripts start
时将热重载文件写入可见文件夹?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.