From 866d5428bcb06b4978f8039fe7197c560559d1aa Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 22 Oct 2017 15:01:02 +0900 Subject: [PATCH] Use uglifyjs-webpack-plugin instead of uglify-es-webpack-plugin Because uglify-es-webpack-plugin is now deprecated --- package.json | 8 ++++---- webpack/plugins/index.ts | 8 +++----- webpack/plugins/minify.ts | 4 ++-- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index e6fc742913..befa8b2b4e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "misskey", "author": "syuilo ", - "version": "0.0.2584", + "version": "0.0.2732", "license": "MIT", "description": "A miniblog-based SNS", "bugs": "https://github.com/syuilo/misskey/issues", @@ -64,7 +64,7 @@ "@types/webpack": "3.0.13", "@types/webpack-stream": "3.2.7", "@types/websocket": "0.0.34", - "awesome-typescript-loader": "^3.2.3", + "awesome-typescript-loader": "3.2.3", "chai": "4.1.2", "chai-http": "3.0.0", "css-loader": "0.28.7", @@ -90,8 +90,8 @@ "swagger-jsdoc": "1.9.7", "tslint": "5.7.0", "uglify-es": "3.0.27", - "uglify-es-webpack-plugin": "0.10.0", "uglify-js": "git+https://github.com/mishoo/UglifyJS2.git#harmony", + "uglifyjs-webpack-plugin": "1.0.0-beta.2", "webpack": "3.8.1" }, "dependencies": { @@ -109,7 +109,7 @@ "debug": "3.1.0", "deep-equal": "1.0.1", "deepcopy": "0.6.3", - "diskusage": "^0.2.2", + "diskusage": "0.2.2", "download": "6.2.5", "elasticsearch": "13.3.1", "escape-regexp": "0.0.1", diff --git a/webpack/plugins/index.ts b/webpack/plugins/index.ts index 99b16c2b05..d5191f1555 100644 --- a/webpack/plugins/index.ts +++ b/webpack/plugins/index.ts @@ -2,13 +2,11 @@ const StringReplacePlugin = require('string-replace-webpack-plugin'); import constant from './const'; import hoist from './hoist'; -//import minify from './minify'; +import minify from './minify'; import banner from './banner'; -/* const env = process.env.NODE_ENV; const isProduction = env === 'production'; -*/ export default version => { const plugins = [ @@ -16,11 +14,11 @@ export default version => { new StringReplacePlugin(), hoist() ]; -/* + if (isProduction) { plugins.push(minify()); } -*/ + plugins.push(banner(version)); return plugins; diff --git a/webpack/plugins/minify.ts b/webpack/plugins/minify.ts index ec4c9b3405..e46d4c5a10 100644 --- a/webpack/plugins/minify.ts +++ b/webpack/plugins/minify.ts @@ -1,3 +1,3 @@ -const UglifyEsPlugin = require('uglify-es-webpack-plugin'); +const UglifyJsPlugin = require('uglifyjs-webpack-plugin'); -export default () => new UglifyEsPlugin(); +export default () => new UglifyJsPlugin();