build: 서버별 build가 다를 가능성 고려
This commit is contained in:
@@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
"ingame": {
|
||||||
|
"chiefCenter": "chiefCenter.ts",
|
||||||
|
"common": "common_deprecated.ts",
|
||||||
|
"troop": "troop.ts",
|
||||||
|
"map": "map.ts",
|
||||||
|
"install_db": "install_db.ts",
|
||||||
|
"install": "install.ts",
|
||||||
|
"battle_simulator": "battle_simulator.ts",
|
||||||
|
"recent_map": "recent_map.ts",
|
||||||
|
"processing": "processing.ts",
|
||||||
|
"select_npc": "select_npc.ts",
|
||||||
|
"betting": "betting.ts",
|
||||||
|
"bossInfo": "bossInfo.ts",
|
||||||
|
"myPage": "myPage.ts",
|
||||||
|
"extExpandCity": "extExpandCity.ts",
|
||||||
|
"main": "main.ts",
|
||||||
|
"dipcenter": "dipcenter.ts",
|
||||||
|
"diplomacy": "diplomacy.ts",
|
||||||
|
"currentCity": "currentCity.ts",
|
||||||
|
"hallOfFame": "hallOfFame.ts",
|
||||||
|
"history": "history.ts",
|
||||||
|
"join": "join.ts",
|
||||||
|
"select_general_from_pool": "select_general_from_pool.ts",
|
||||||
|
"extKingdoms": "extKingdoms.ts"
|
||||||
|
},
|
||||||
|
"ingame_vue": {
|
||||||
|
"v_inheritPoint": "v_inheritPoint.ts",
|
||||||
|
"v_board": "v_board.ts",
|
||||||
|
"v_NPCControl": "v_NPCControl.ts"
|
||||||
|
}
|
||||||
|
}
|
||||||
+15
-31
@@ -10,6 +10,19 @@ module.exports = (env, argv) => {
|
|||||||
const target = env.target ?? 'hwe';
|
const target = env.target ?? 'hwe';
|
||||||
const mode = argv.mode ?? 'production';
|
const mode = argv.mode ?? 'production';
|
||||||
const tsDir = resolve(__dirname, `${target}/ts/`);
|
const tsDir = resolve(__dirname, `${target}/ts/`);
|
||||||
|
const build_exports = require(`${tsDir}/build_exports.json`);
|
||||||
|
|
||||||
|
|
||||||
|
//서버마다 ts 파일 구성이 다를 가능성이 높기 때문에 어떤 파일이 필요한지는 ts/build_exports.json을 확인한다.
|
||||||
|
const entryIngameVue = {};
|
||||||
|
for (const [entry, filePath] of Object.entries(build_exports.ingame_vue) ?? []) {
|
||||||
|
entryIngameVue[entry] = `${tsDir}/${filePath}`;
|
||||||
|
}
|
||||||
|
const entryIngame = {};
|
||||||
|
for (const [entry, filePath] of Object.entries(build_exports.ingame) ?? []) {
|
||||||
|
entryIngame[entry] = `${tsDir}/${filePath}`;
|
||||||
|
}
|
||||||
|
|
||||||
const ingame_vue = {
|
const ingame_vue = {
|
||||||
name: `ingame_${target}_vue`,
|
name: `ingame_${target}_vue`,
|
||||||
resolve: {
|
resolve: {
|
||||||
@@ -19,12 +32,7 @@ module.exports = (env, argv) => {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mode,
|
mode,
|
||||||
entry: {
|
entry: entryIngameVue,
|
||||||
v_inheritPoint: `${tsDir}/v_inheritPoint.ts`,
|
|
||||||
v_board: `${tsDir}/v_board.ts`,
|
|
||||||
v_NPCControl: `${tsDir}/v_NPCControl.ts`,
|
|
||||||
|
|
||||||
},
|
|
||||||
output: {
|
output: {
|
||||||
filename: '[name].js',
|
filename: '[name].js',
|
||||||
path: resolve(__dirname, `${target}/dist_js`)
|
path: resolve(__dirname, `${target}/dist_js`)
|
||||||
@@ -169,31 +177,7 @@ module.exports = (env, argv) => {
|
|||||||
extensions: [".js", ".ts", ".tsx"],
|
extensions: [".js", ".ts", ".tsx"],
|
||||||
},
|
},
|
||||||
mode,
|
mode,
|
||||||
entry: {
|
entry: entryIngame,
|
||||||
chiefCenter: `${tsDir}/chiefCenter.ts`,
|
|
||||||
common: `${tsDir}/common_deprecated.ts`,
|
|
||||||
troop: `${tsDir}/troop.ts`,
|
|
||||||
map: `${tsDir}/map.ts`,
|
|
||||||
install_db: `${tsDir}/install_db.ts`,
|
|
||||||
install: `${tsDir}/install.ts`,
|
|
||||||
battle_simulator: `${tsDir}/battle_simulator.ts`,
|
|
||||||
recent_map: `${tsDir}/recent_map.ts`,
|
|
||||||
processing: `${tsDir}/processing.ts`,
|
|
||||||
select_npc: `${tsDir}/select_npc.ts`,
|
|
||||||
betting: `${tsDir}/betting.ts`,
|
|
||||||
bossInfo: `${tsDir}/bossInfo.ts`,
|
|
||||||
myPage: `${tsDir}/myPage.ts`,
|
|
||||||
extExpandCity: `${tsDir}/extExpandCity.ts`,
|
|
||||||
main: `${tsDir}/main.ts`,
|
|
||||||
dipcenter: `${tsDir}/dipcenter.ts`,
|
|
||||||
diplomacy: `${tsDir}/diplomacy.ts`,
|
|
||||||
currentCity: `${tsDir}/currentCity.ts`,
|
|
||||||
hallOfFame: `${tsDir}/hallOfFame.ts`,
|
|
||||||
history: `${tsDir}/history.ts`,
|
|
||||||
join: `${tsDir}/join.ts`,
|
|
||||||
select_general_from_pool: `${tsDir}/select_general_from_pool.ts`,
|
|
||||||
extKingdoms: `${tsDir}/extKingdoms.ts`,
|
|
||||||
},
|
|
||||||
output: {
|
output: {
|
||||||
filename: '[name].js',
|
filename: '[name].js',
|
||||||
path: resolve(__dirname, `${target}/dist_js`)
|
path: resolve(__dirname, `${target}/dist_js`)
|
||||||
|
|||||||
Reference in New Issue
Block a user