diff --git a/frontend/my/config-overrides.js b/frontend/my/config-overrides.js new file mode 100644 index 0000000..da82397 --- /dev/null +++ b/frontend/my/config-overrides.js @@ -0,0 +1,30 @@ +const {injectBabelPlugin} = require("react-app-rewired"); +const rewireLess = require("react-app-rewire-less"); + +module.exports = function override(config, env) { + config = injectBabelPlugin( + [ + "import", { + libraryName: "antd", + libraryDirectory: "es", + style: true + } + ], // change importing css to less + config, + ); + config = rewireLess.withLoaderOptions({ + modifyVars: { + "@font-family": + '"IBM Plex Sans", "Helvetica Neueue", "Segoe UI", "sans-serif"', + "@font-size-base": "15px", + "@primary-color": "#7f2aff", + "@shadow-1-up": "0 -2px 3px @shadow-color", + "@shadow-1-down": "0 2px 3px @shadow-color", + "@shadow-1-left": "-2px 0 3px @shadow-color", + "@shadow-1-right": "2px 0 3px @shadow-color", + "@shadow-2": "0 2px 6px @shadow-color" + }, + javascriptEnabled: true, + })(config, env); + return config; +}; \ No newline at end of file diff --git a/frontend/my/package.json b/frontend/my/package.json index 7ebd099..d51b916 100644 --- a/frontend/my/package.json +++ b/frontend/my/package.json @@ -7,20 +7,31 @@ "axios": "^0.18.0", "dayjs": "^1.7.5", "react": "^16.4.1", + "react-app-rewire-less": "^2.1.3", + "react-app-rewired": "^1.6.2", "react-dom": "^16.4.1", "react-quill": "^1.3.1", "react-router": "^4.3.1", "react-router-dom": "^4.3.1", "react-scripts": "1.1.4" }, - "scripts": { + "xxscripts": { "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test --env=jsdom", "eject": "react-scripts eject" }, - "theme": "./src/theme.js", + "scripts": { + "start": "react-app-rewired start", + "build": "react-app-rewired build", + "test": "react-app-rewired test --env=jsdom", + "eject": "react-scripts eject" + }, "eslintConfig": { "extends": "react-app" + }, + "devDependencies": { + "babel-plugin-import": "^1.11.0", + "less-plugin-npm-import": "^2.1.0" } } diff --git a/frontend/my/public/favicon.ico b/frontend/my/public/favicon.ico deleted file mode 100644 index a11777c..0000000 Binary files a/frontend/my/public/favicon.ico and /dev/null differ diff --git a/frontend/my/public/favicon.png b/frontend/my/public/favicon.png new file mode 100644 index 0000000..be167d9 Binary files /dev/null and b/frontend/my/public/favicon.png differ diff --git a/frontend/my/public/index.html b/frontend/my/public/index.html index ac8ab82..2288373 100644 --- a/frontend/my/public/index.html +++ b/frontend/my/public/index.html @@ -5,9 +5,10 @@ + - - React App + + %PUBLIC_URL%