watch에 dev 모드 추가
This commit is contained in:
+5
-1
@@ -6,7 +6,8 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Error: no test specified\" && exit 1",
|
"test": "echo \"Error: no test specified\" && exit 1",
|
||||||
"build": "webpack",
|
"build": "webpack",
|
||||||
"watch": "webpack watch",
|
"watch": "webpack watch --mode=development",
|
||||||
|
"watchProd": "webpack watch",
|
||||||
"lint": "eslint hwe/ts ts"
|
"lint": "eslint hwe/ts ts"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
@@ -18,6 +19,7 @@
|
|||||||
"type": "module",
|
"type": "module",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/downloadjs": "^1.4.2",
|
"@types/downloadjs": "^1.4.2",
|
||||||
|
"@types/linkifyjs": "^2.1.4",
|
||||||
"@types/select2": "^4.0.54",
|
"@types/select2": "^4.0.54",
|
||||||
"async-validator": "^4.0.2",
|
"async-validator": "^4.0.2",
|
||||||
"axios": "^0.21.1",
|
"axios": "^0.21.1",
|
||||||
@@ -27,7 +29,9 @@
|
|||||||
"downloadjs": "^1.4.7",
|
"downloadjs": "^1.4.7",
|
||||||
"jquery": "^3.6.0",
|
"jquery": "^3.6.0",
|
||||||
"js-sha512": "^0.8.0",
|
"js-sha512": "^0.8.0",
|
||||||
|
"linkifyjs": "^2.1",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
|
"query-string": "^7.0.1",
|
||||||
"select2": "^4.0",
|
"select2": "^4.0",
|
||||||
"vue": "^3.2.2"
|
"vue": "^3.2.2"
|
||||||
},
|
},
|
||||||
|
|||||||
+5
-4
@@ -4,8 +4,9 @@ const MiniCssExtractPlugin = require('mini-css-extract-plugin')
|
|||||||
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
|
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
|
||||||
const { resolve } = require('path');
|
const { resolve } = require('path');
|
||||||
|
|
||||||
module.exports = (env) => {
|
module.exports = (env, argv) => {
|
||||||
const target = env.target??'hwe';
|
const target = env.target??'hwe';
|
||||||
|
const mode = argv.mode ?? 'production';
|
||||||
const ingame = {
|
const ingame = {
|
||||||
name: 'ingame',
|
name: 'ingame',
|
||||||
resolve: {
|
resolve: {
|
||||||
@@ -14,6 +15,7 @@ module.exports = (env) => {
|
|||||||
'@': resolve(__dirname, `${target}/ts`)
|
'@': resolve(__dirname, `${target}/ts`)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
mode,
|
||||||
entry: {
|
entry: {
|
||||||
chiefCenter: '@/chiefCenter.ts',
|
chiefCenter: '@/chiefCenter.ts',
|
||||||
inheritPoint: '@/inheritPoint.ts',
|
inheritPoint: '@/inheritPoint.ts',
|
||||||
@@ -31,7 +33,7 @@ module.exports = (env) => {
|
|||||||
bossInfo: '@/bossInfo.ts',
|
bossInfo: '@/bossInfo.ts',
|
||||||
myPage: '@/myPage.ts',
|
myPage: '@/myPage.ts',
|
||||||
extExpandCity: '@/extExpandCity.ts',
|
extExpandCity: '@/extExpandCity.ts',
|
||||||
msg: '@/msg.ts',
|
main: '@/main.ts',
|
||||||
|
|
||||||
|
|
||||||
//FORM 입력용, frontend 변경후 제거
|
//FORM 입력용, frontend 변경후 제거
|
||||||
@@ -44,7 +46,6 @@ module.exports = (env) => {
|
|||||||
filename: '[name].js',
|
filename: '[name].js',
|
||||||
path: resolve(__dirname, `${target}/dist_js`)
|
path: resolve(__dirname, `${target}/dist_js`)
|
||||||
},
|
},
|
||||||
mode: 'production',
|
|
||||||
devtool: 'source-map',
|
devtool: 'source-map',
|
||||||
optimization: {
|
optimization: {
|
||||||
splitChunks: {
|
splitChunks: {
|
||||||
@@ -113,6 +114,7 @@ module.exports = (env) => {
|
|||||||
resolve: {
|
resolve: {
|
||||||
extensions: [".js", ".ts", ".tsx"]
|
extensions: [".js", ".ts", ".tsx"]
|
||||||
},
|
},
|
||||||
|
mode,
|
||||||
entry: {
|
entry: {
|
||||||
'common': './ts/common_deprecated.ts',
|
'common': './ts/common_deprecated.ts',
|
||||||
'entrance': './ts/entrance.ts',
|
'entrance': './ts/entrance.ts',
|
||||||
@@ -126,7 +128,6 @@ module.exports = (env) => {
|
|||||||
filename: '[name].js',
|
filename: '[name].js',
|
||||||
path: path.resolve(__dirname, 'dist_js'),
|
path: path.resolve(__dirname, 'dist_js'),
|
||||||
},
|
},
|
||||||
mode: 'production',
|
|
||||||
devtool: 'source-map',
|
devtool: 'source-map',
|
||||||
optimization: {
|
optimization: {
|
||||||
splitChunks: {
|
splitChunks: {
|
||||||
|
|||||||
Reference in New Issue
Block a user