以修改为中文显示为例
下载前端
npm install
# we use webpack DllReference to decrease the build time,
# this command only needs execute once unless you upgrade the package in build/webpack.dll.conf.js
export NODE_ENV=development
npm run build:dll
# the dev-server will set proxy table to your backend
export TARGET=http://127.0.0.1
# serve with hot reload at localhost:8080
npm run dev
修改前端
首先将OnlineJudgeFE/src/i18n/index.js里的“en-US”替换为“zh-CN”
构建前端
所有修改好以后,重新构建,
npm run builld
目录下会生成dist文件夹,可将改修改后的dist文件夹拷贝到新的位置,
前端覆盖
然后我们打开docker-compose.yml ,在volumes下面增加一行(前面的路径根据自己的实际修改,后面的路径不用,查看可以使用docker exec -it oj-backend
进行查看):
~/YOUR_PATH/dist:/app/dist