diff --git a/Dockerfile b/Dockerfile index ae0bdc9b..29df29bb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,7 @@ ARG REACT_APP_CREATABLE_REGION ARG REACT_APP_CREATABLE_INSTANCE COPY . /app WORKDIR /app -RUN npm install +RUN npm install -s RUN NODE_OPTIONS="--max-old-space-size=4096" npm run build RUN rm -rf /app/build/static/js/*.map FROM nginx:alpine as production-stage diff --git a/package.json b/package.json index 71e46d02..6f1fee0d 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,11 @@ { "name": "ui", - "version": "0.32.0", + "version": "0.32.1", "private": true, "scripts": { - "dev": "react-scripts start", + "dev": "GENERATE_SOURCEMAP=false react-scripts start", "watch": "npx tailwindcss -i ./tailwind.css -o ./public/css/style.css --watch", - "build": "react-scripts --max_old_space_size=4096 build", + "build": "GENERATE_SOURCEMAP=false react-scripts --max_old_space_size=4096 build", "test": "react-scripts test", "eject": "react-scripts eject" }, diff --git a/src/components/ModeSwitcher/ModeSwitcher.tsx b/src/components/ModeSwitcher/ModeSwitcher.tsx index 0dc11b93..041f58f2 100644 --- a/src/components/ModeSwitcher/ModeSwitcher.tsx +++ b/src/components/ModeSwitcher/ModeSwitcher.tsx @@ -1,8 +1,8 @@ -import { ReactElement } from "react"; -import Toggle from "react-toggle"; import { useAppDispatch, useAppSelector } from "../../hooks/redux"; -import { setApplicationMode } from "../../toolkit/UserSlice"; import { envSwitchableMode } from "../../helpers/envProvider"; +import { setApplicationMode } from "../../toolkit/UserSlice"; +import { ReactElement } from "react"; +import Toggle from "react-toggle"; export default function ModeSwitcher(): ReactElement { const { applicationMode } = useAppSelector((state) => state.user); @@ -18,6 +18,11 @@ export default function ModeSwitcher(): ReactElement { onChange={(e) => { setTimeout(() => { dispatch(setApplicationMode(e.target.checked)); + document.body.classList.add( + "animate__animated", + "animate__fadeOut", + "animate__faster", + ); window.location.reload(); }, 1000); }} diff --git a/src/index.tsx b/src/index.tsx index 86524272..c62ab8f6 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -12,7 +12,7 @@ import "@fontsource/inter/700.css"; import "@fontsource/inter/800.css"; import "@fontsource/inter/900.css"; import App from "./App"; -// import "animate.css"; +import "animate.css"; import "react-loading-skeleton/dist/skeleton.css"; const root = ReactDOM.createRoot( diff --git a/webpack.config.js b/webpack.config.js deleted file mode 100644 index 50629649..00000000 --- a/webpack.config.js +++ /dev/null @@ -1,18 +0,0 @@ -process.env.NODE_OPTIONS = "--max_old_space_size=4096"; - -module.exports = { - stats: { - hash: true, - version: true, - timings: true, - children: false, - errors: true, - errorDetails: true, - warnings: true, - chunks: false, - modules: false, - reasons: true, - source: true, - publicPath: true, - }, -};