首页 > 解决方案 > 如何更改 react-app-rewired 的构建路径

问题描述

我正在尝试更改文件 config-overrides.json 中 react-app-rewired 的构建路径,如此处所述

  [https://github.com/timarney/react-app-rewired/issues/201][1]

  module.exports = {
     paths: function (paths, env) {
     paths.appBuild = 'C:\\Projects\\jhipster\\src\\main\\webapp\\app';
     return paths;
  }
  };

但它没有被考虑在内,我收到以下错误:

 Could not find a required file.
 Name: index.html
 Searched in: C:\Projects\jhipster\public

我直接硬编码路径只是为了测试它是否有效。

我遗漏了什么吗?

标签: pathreact-app-rewired

解决方案


推荐阅读