forked from devsam/core
build: 서버별 build가 다를 가능성 고려
This commit is contained in:
+15
-31
@@ -10,6 +10,19 @@ module.exports = (env, argv) => {
|
||||
const target = env.target ?? 'hwe';
|
||||
const mode = argv.mode ?? 'production';
|
||||
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 = {
|
||||
name: `ingame_${target}_vue`,
|
||||
resolve: {
|
||||
@@ -19,12 +32,7 @@ module.exports = (env, argv) => {
|
||||
}
|
||||
},
|
||||
mode,
|
||||
entry: {
|
||||
v_inheritPoint: `${tsDir}/v_inheritPoint.ts`,
|
||||
v_board: `${tsDir}/v_board.ts`,
|
||||
v_NPCControl: `${tsDir}/v_NPCControl.ts`,
|
||||
|
||||
},
|
||||
entry: entryIngameVue,
|
||||
output: {
|
||||
filename: '[name].js',
|
||||
path: resolve(__dirname, `${target}/dist_js`)
|
||||
@@ -169,31 +177,7 @@ module.exports = (env, argv) => {
|
||||
extensions: [".js", ".ts", ".tsx"],
|
||||
},
|
||||
mode,
|
||||
entry: {
|
||||
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`,
|
||||
},
|
||||
entry: entryIngame,
|
||||
output: {
|
||||
filename: '[name].js',
|
||||
path: resolve(__dirname, `${target}/dist_js`)
|
||||
|
||||
Reference in New Issue
Block a user