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