From 10019ceb6d538e030dd3f35c7c8e48baffc06e0d Mon Sep 17 00:00:00 2001
From: syuilo <syuilotan@yahoo.co.jp>
Date: Thu, 25 May 2017 16:45:18 +0900
Subject: [PATCH] Enable toplevel mangling

---
 gulpfile.ts | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gulpfile.ts b/gulpfile.ts
index f9bd85b438..55452fe7f0 100644
--- a/gulpfile.ts
+++ b/gulpfile.ts
@@ -120,7 +120,9 @@ gulp.task('webpack', done => {
 gulp.task('build:client:script', () =>
 	gulp.src(['./src/web/app/boot.js', './src/web/app/safe.js'])
 		.pipe(replace('VERSION', JSON.stringify(version)))
-		.pipe(isProduction ? uglify() : gutil.noop())
+		.pipe(isProduction ? uglify({
+			toplevel: true
+		}) : gutil.noop())
 		.pipe(gulp.dest('./built/web/assets/')) as any
 );