Q React 样板文件如何从发出的 .htaccess.bin 文件中删除 .bin 扩展名

Q React boilerplate how to remove .bin extension from the emitted .htaccess.bin file

我正在使用 react boilerplate,当我 运行 构建脚本 "npm run build" npm 执行以下命令时

webpack --config internals/webpack/webpack.prod.babel.js --color -p --progress --hide-modules --display-optimization-bailout

这会构建应用程序并将所有文件发送到构建文件夹。

我的源代码中现在有一个 .htaccess 文件,当应用程序在构建过程中的某处构建时,.htaccess 文件获得一个 .bin 扩展名,并作为 .htaccess.bin[=12= 发出]

如何防止构建过程将 .bin 扩展名添加到 .htaccess 文件?

此答案已在 github issue of react boilerplate. This issue has been fixed in the latest build of react-boilerplate 中提供。

无论如何,如果您想解决这个问题,请将 app.js.htaccess 的导入更改为如下

import 'file-loader?name=.htaccess!./.htaccess';

请参阅 github repo of react boilerplate

中已修复的 app.js 文件