/react-app-rewire-flat-static-folder

Update the create-react-app build to output a folderless set of static assets.

Primary LanguageJavaScriptGNU General Public License v3.0GPL-3.0

react-app-rewire-flat-static-folder

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.

Installation

npm install --save react-app-rewire-flat-static-folder

Usage

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.

License

Licensed under the GNU General Public License v3, Copyright ©️ 2020 Chris Jeffery. See LICENSE for more information.