build: 빌드 환경 재 설정

- lock에 따라 npm ci로 변경
- webpack build를 서버 내에서 하므로 dev dependency가 거의 없음
- webpack build에서 gateway build를 별도로 작성
This commit is contained in:
2022-03-13 19:47:24 +09:00
parent 5fe9136aa1
commit 91ea0d1c2a
4 changed files with 409 additions and 1553 deletions
+12 -4
View File
@@ -8,7 +8,8 @@ const { ESBuildMinifyPlugin } = require('esbuild-loader')
const webpack = require('webpack');
const fs = require('fs');
module.exports = (env, argv) => {
const target = env.target ?? 'hwe';
const rawTarget = env.target ?? 'hwe';
const target = (rawTarget == 'gateway') ? 'hwe' : rawTarget;
const mode = argv.mode ?? 'production';
const tsDir = resolve(__dirname, `${target}/ts/`);
const build_exports = require(`${tsDir}/build_exports.json`);
@@ -90,8 +91,8 @@ module.exports = (env, argv) => {
};
const performance = {
maxAssetSize: 5*1024*1024,
maxEntrypointSize: 3*1024*1024,
maxAssetSize: 5 * 1024 * 1024,
maxEntrypointSize: 3 * 1024 * 1024,
}
const ingame_vue = {
@@ -365,11 +366,18 @@ module.exports = (env, argv) => {
performance,
};
const buildConfList = [];
if (rawTarget == 'gateway') {
buildConfList.push(gateway);
return buildConfList;
}
if (env.WEBPACK_WATCH || !versionValue) {
return [gateway, ingame_vue, ingame];
}
const buildConfList = [];
if (target == 'hwe' && !fs.existsSync(resolve(outputPath, `build_gateway.txt`))) {
buildConfList.push(gateway);
}