build: devtool 결과 최적화
This commit is contained in:
+6
-4
@@ -58,7 +58,9 @@ module.exports = (env, argv) => {
|
|||||||
for (const [entry, filePath] of Object.entries(build_exports.ingame) ?? []) {
|
for (const [entry, filePath] of Object.entries(build_exports.ingame) ?? []) {
|
||||||
entryIngame[entry] = `${tsDir}/${filePath}`;
|
entryIngame[entry] = `${tsDir}/${filePath}`;
|
||||||
}
|
}
|
||||||
const cacheDirectory = path.resolve(__dirname, 'node_modules/.cache/webpack')
|
const cacheDirectory = path.resolve(__dirname, 'node_modules/.cache/webpack');
|
||||||
|
|
||||||
|
const devtool = mode != 'production' ? 'eval-source-map' : (env.WEBPACK_WATCH ? 'source-map' : undefined);
|
||||||
|
|
||||||
const optimization = {
|
const optimization = {
|
||||||
splitChunks: {
|
splitChunks: {
|
||||||
@@ -104,7 +106,7 @@ module.exports = (env, argv) => {
|
|||||||
filename: '[name].js',
|
filename: '[name].js',
|
||||||
path: resolve(outputPath, 'vue')
|
path: resolve(outputPath, 'vue')
|
||||||
},
|
},
|
||||||
devtool: 'source-map',
|
devtool,
|
||||||
optimization,
|
optimization,
|
||||||
module: {
|
module: {
|
||||||
rules: [
|
rules: [
|
||||||
@@ -215,7 +217,7 @@ module.exports = (env, argv) => {
|
|||||||
filename: '[name].js',
|
filename: '[name].js',
|
||||||
path: resolve(outputPath, 'ts')
|
path: resolve(outputPath, 'ts')
|
||||||
},
|
},
|
||||||
devtool: 'source-map',
|
devtool,
|
||||||
optimization,
|
optimization,
|
||||||
module: {
|
module: {
|
||||||
rules: [{
|
rules: [{
|
||||||
@@ -297,7 +299,7 @@ module.exports = (env, argv) => {
|
|||||||
filename: '[name].js',
|
filename: '[name].js',
|
||||||
path: resolve(__dirname, 'dist_js', 'gateway')
|
path: resolve(__dirname, 'dist_js', 'gateway')
|
||||||
},
|
},
|
||||||
devtool: 'source-map',
|
devtool,
|
||||||
optimization,
|
optimization,
|
||||||
module: {
|
module: {
|
||||||
rules: [{
|
rules: [{
|
||||||
|
|||||||
Reference in New Issue
Block a user