Flatten the static folder from the react build from create-react-app with react-app-rewired.
Add to your create-react-app
app via react-app-rewired
.
npm install --save react-app-rewire-flat-static-folder
In the config-overrides.js
you created for react-app-rewired
add this code:
const rewireFlatStaticFolder = require('react-app-rewire-flat-static-folder');
/* config-overrides.js */
module.exports = function override(config, env) {
config = rewireFlatStaticFolder(config, env);
return config;
}
That's it! You're done.
NOTE: There are no options/configurations at this time.
Licensed under the GNU General Public License v3, Copyright ©️ 2020 Chris Jeffery. See LICENSE for more information.