From ead8110fb48a5b6d4d415467028db74e0409a43c Mon Sep 17 00:00:00 2001 From: hide_d Date: Sat, 28 Aug 2021 23:13:22 +0900 Subject: [PATCH] =?UTF-8?q?watch=EC=97=90=20dev=20=EB=AA=A8=EB=93=9C=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 6 +++++- webpack.config.cjs | 9 +++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index c71fd8bc..c9e88280 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,8 @@ "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "build": "webpack", - "watch": "webpack watch", + "watch": "webpack watch --mode=development", + "watchProd": "webpack watch", "lint": "eslint hwe/ts ts" }, "repository": { @@ -18,6 +19,7 @@ "type": "module", "dependencies": { "@types/downloadjs": "^1.4.2", + "@types/linkifyjs": "^2.1.4", "@types/select2": "^4.0.54", "async-validator": "^4.0.2", "axios": "^0.21.1", @@ -27,7 +29,9 @@ "downloadjs": "^1.4.7", "jquery": "^3.6.0", "js-sha512": "^0.8.0", + "linkifyjs": "^2.1", "lodash": "^4.17.21", + "query-string": "^7.0.1", "select2": "^4.0", "vue": "^3.2.2" }, diff --git a/webpack.config.cjs b/webpack.config.cjs index cbb29bce..26c14ad8 100644 --- a/webpack.config.cjs +++ b/webpack.config.cjs @@ -4,8 +4,9 @@ const MiniCssExtractPlugin = require('mini-css-extract-plugin') const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; const { resolve } = require('path'); -module.exports = (env) => { +module.exports = (env, argv) => { const target = env.target??'hwe'; + const mode = argv.mode ?? 'production'; const ingame = { name: 'ingame', resolve: { @@ -14,6 +15,7 @@ module.exports = (env) => { '@': resolve(__dirname, `${target}/ts`) } }, + mode, entry: { chiefCenter: '@/chiefCenter.ts', inheritPoint: '@/inheritPoint.ts', @@ -31,7 +33,7 @@ module.exports = (env) => { bossInfo: '@/bossInfo.ts', myPage: '@/myPage.ts', extExpandCity: '@/extExpandCity.ts', - msg: '@/msg.ts', + main: '@/main.ts', //FORM 입력용, frontend 변경후 제거 @@ -44,7 +46,6 @@ module.exports = (env) => { filename: '[name].js', path: resolve(__dirname, `${target}/dist_js`) }, - mode: 'production', devtool: 'source-map', optimization: { splitChunks: { @@ -113,6 +114,7 @@ module.exports = (env) => { resolve: { extensions: [".js", ".ts", ".tsx"] }, + mode, entry: { 'common': './ts/common_deprecated.ts', 'entrance': './ts/entrance.ts', @@ -126,7 +128,6 @@ module.exports = (env) => { filename: '[name].js', path: path.resolve(__dirname, 'dist_js'), }, - mode: 'production', devtool: 'source-map', optimization: { splitChunks: {