Skip to content

Commit

Permalink
dev build
Browse files Browse the repository at this point in the history
  • Loading branch information
Karlatemp committed Jun 28, 2024
1 parent e09ec9b commit 164560c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
7 changes: 7 additions & 0 deletions config-overrides.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ const CopyPlugin = require("copy-webpack-plugin");

module.exports = {
webpack: override(
(config) => {
if (process.env.DEV_MODE) {
config.mode = 'development';
config.optimization.minimize = false;
}
return config;
},
addLessLoader({
lessLoaderOptions: {
lessOptions: {},
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"start": "react-app-rewired start",
"dev": "react-app-rewired start",
"build": "react-app-rewired build",
"build:dev": "cross-env DEV_MODE=true react-app-rewired build",
"eject": "react-scripts eject",
"eslint": "eslint src/ --ext .ts,.tsx,.js,.jsx --fix --cache",
"stylelint": "stylelint \"src/**/*.less\" \"src/**/*.css\" --fix --cache",
Expand Down Expand Up @@ -47,6 +48,7 @@
"@types/react-dom": "^17.0.0",
"@typescript-eslint/eslint-plugin": "^5.4.0",
"@typescript-eslint/parser": "^5.4.0",
"cross-env": "^7.0.3",
"customize-cra": "^1.0.0",
"customize-cra-less-loader": "^2.0.0",
"eslint": "^8.9.0",
Expand Down
9 changes: 8 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5079,7 +5079,14 @@ cosmiconfig@^7.0.0:
path-type "^4.0.0"
yaml "^1.10.0"

cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3:
cross-env@^7.0.3:
version "7.0.3"
resolved "https://registry.npmmirror.com/cross-env/-/cross-env-7.0.3.tgz#865264b29677dc015ba8418918965dd232fc54cf"
integrity sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==
dependencies:
cross-spawn "^7.0.1"

cross-spawn@^7.0.0, cross-spawn@^7.0.1, cross-spawn@^7.0.2, cross-spawn@^7.0.3:
version "7.0.3"
resolved "https://registry.npmmirror.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6"
integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==
Expand Down

0 comments on commit 164560c

Please sign in to comment.