From 53a8db105c85c0d848daf198a8fdf9a06d184179 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Sun, 23 Jan 2022 23:37:34 +0000 Subject: [PATCH] Updated webpack --- package.json | 2 +- webpack.config.js | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 76e7613f..54488f32 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "scripts": { "dev": "webpack serve", "editor": "phasereditor2d-launcher -project .", - "build": "webpack --mode production", + "build": "webpack --mode production --env obfuscate=false", "build-crumbs": "node ./utils/build-crumbs.js" }, "repository": { diff --git a/webpack.config.js b/webpack.config.js index c8ee4ad1..3a3593f4 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -74,12 +74,14 @@ module.exports = (env, argv) => { config.output.filename = 'yukon.min.js' config.optimization.minimize = true - config.plugins.push( - new WebpackObfuscator({ - rotateStringArray: true, - reservedStrings: ['\s*'] - }, []) - ) + if (env.obfuscate === 'true') { + config.plugins.push( + new WebpackObfuscator({ + rotateStringArray: true, + reservedStrings: ['\s*'] + }, []) + ) + } } return config