diff --git a/crabfit-frontend/config-overrides.js b/crabfit-frontend/config-overrides.js new file mode 100644 index 0000000..44e3ac7 --- /dev/null +++ b/crabfit-frontend/config-overrides.js @@ -0,0 +1,11 @@ +module.exports = function override(config, env) { + config.output.filename = env === 'production' + ? 'static/js/[name].[contenthash].js' + : env === 'development' && 'static/js/bundle.js'; + + config.output.chunkFilename = env === 'production' + ? 'static/js/[name].[contenthash].chunk.js' + : env === 'development' && 'static/js/[name].chunk.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 @@
- +