diff --git a/crabfit-frontend/config-overrides.js b/crabfit-frontend/config-overrides.js new file mode 100644 index 0000000..5be481b --- /dev/null +++ b/crabfit-frontend/config-overrides.js @@ -0,0 +1,7 @@ +module.exports = function override(config, env) { + config.output.filename = env === 'production' + ? 'static/js/[name].[contenthash].js' + : env === 'development' && 'static/js/bundle.js'; + + return config; +} diff --git a/crabfit-frontend/package.json b/crabfit-frontend/package.json index aeefe16..32303b8 100644 --- a/crabfit-frontend/package.json +++ b/crabfit-frontend/package.json @@ -41,9 +41,9 @@ "zustand": "^3.3.2" }, "scripts": { - "start": "react-scripts start", - "build": "react-scripts build", - "test": "react-scripts test", + "start": "react-app-rewired start", + "build": "react-app-rewired build", + "test": "react-app-rewired test", "eject": "react-scripts eject" }, "eslintConfig": { @@ -63,5 +63,8 @@ "last 1 firefox version", "last 1 safari version" ] + }, + "devDependencies": { + "react-app-rewired": "^2.1.8" } } diff --git a/crabfit-frontend/public/index.html b/crabfit-frontend/public/index.html index 0ff263d..49cc9b7 100644 --- a/crabfit-frontend/public/index.html +++ b/crabfit-frontend/public/index.html @@ -36,7 +36,7 @@ -
diff --git a/crabfit-frontend/yarn.lock b/crabfit-frontend/yarn.lock index f799fc3..140d018 100644 --- a/crabfit-frontend/yarn.lock +++ b/crabfit-frontend/yarn.lock @@ -9151,6 +9151,13 @@ react-app-polyfill@^2.0.0: regenerator-runtime "^0.13.7" whatwg-fetch "^3.4.1" +react-app-rewired@^2.1.8: + version "2.1.8" + resolved "https://registry.yarnpkg.com/react-app-rewired/-/react-app-rewired-2.1.8.tgz#e192f93b98daf96889418d33d3e86cf863812b56" + integrity sha512-wjXPdKPLscA7mn0I1de1NHrbfWdXz4S1ladaGgHVKdn1hTgKK5N6EdGIJM0KrS6bKnJBj7WuqJroDTsPKKr66Q== + dependencies: + semver "^5.6.0" + react-dev-utils@^11.0.3: version "11.0.3" resolved "https://registry.yarnpkg.com/react-dev-utils/-/react-dev-utils-11.0.3.tgz#b61ed499c7d74f447d4faddcc547e5e671e97c08"