This commit is contained in:
CodeServer 2022-03-31 20:24:49 +01:00
parent 4f306d2fea
commit c9e51c21de
6 changed files with 8 additions and 3 deletions

View File

@ -6,4 +6,4 @@ COPY ["package.json", "package-lock.json*", "./"]
COPY . .
ENV GENERATE_SOURCEMAP false
RUN npm install
CMD [ "npm", "run", "start-local" ]
CMD [ "npm", "run", "start-prod" ]

View File

@ -2,7 +2,7 @@
## Build docker image from docker file
1. cd into the root of this repositry.
1. cd into the root of this repository.
2. On Windows
* run `docker build --tag <image-name> .`

View File

View File

View File

@ -26,7 +26,7 @@
"socket.io-client": "^4.4.1"
},
"scripts": {
"start-prod": "BUILD_ENV=PROD webpack serve --config webpack.config.ts",
"start-prod": "BUILD_ENV=PROD GENERATE_SOURCEMAP=false webpack serve --config webpack.config.ts",
"start-local": "webpack serve --config webpack.config.ts",
"start-dev": "BUILD_ENV=DEV webpack serve --config webpack.config.ts",
"build-local": "BUILD_ENV=LOCAL webpack --config webpack.config.ts",

View File

@ -92,6 +92,11 @@ const baseConfig: Configuration = {
},
target: "web",
performance: {
maxEntrypointSize: 5242880,
maxAssetSize: 5242880
}
};
if (!baseConfig.plugins) throw new Error("No plugins array!");