summaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2019-02-18 19:26:53 +0900
committersyuilo <syuilotan@yahoo.co.jp>2019-02-18 19:26:53 +0900
commit69b74a46b968ee6622d8a5f5f674e46dbc900884 (patch)
treea4c9581ed7654f178f4dbab17c6289310fcd32c2 /src/client
parentFix #4063 (diff)
downloadmisskey-69b74a46b968ee6622d8a5f5f674e46dbc900884.tar.gz
misskey-69b74a46b968ee6622d8a5f5f674e46dbc900884.tar.bz2
misskey-69b74a46b968ee6622d8a5f5f674e46dbc900884.zip
Split cropperjs to reduce bundle size
Diffstat (limited to 'src/client')
-rw-r--r--src/client/app/desktop/api/update-avatar.ts4
-rw-r--r--src/client/app/desktop/api/update-banner.ts4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/client/app/desktop/api/update-avatar.ts b/src/client/app/desktop/api/update-avatar.ts
index be332ab16c..e2da55fc97 100644
--- a/src/client/app/desktop/api/update-avatar.ts
+++ b/src/client/app/desktop/api/update-avatar.ts
@@ -1,10 +1,10 @@
import { apiUrl, locale } from '../../config';
-import CropWindow from '../views/components/crop-window.vue';
import ProgressDialog from '../views/components/progress-dialog.vue';
export default ($root: any) => {
- const cropImage = file => new Promise((resolve, reject) => {
+ const cropImage = file => new Promise(async (resolve, reject) => {
+ const CropWindow = await import('../views/components/crop-window.vue').then(x => x.default);
const w = $root.new(CropWindow, {
image: file,
title: locale['desktop']['avatar-crop-title'],
diff --git a/src/client/app/desktop/api/update-banner.ts b/src/client/app/desktop/api/update-banner.ts
index 50f1b5fe83..e62277338d 100644
--- a/src/client/app/desktop/api/update-banner.ts
+++ b/src/client/app/desktop/api/update-banner.ts
@@ -1,10 +1,10 @@
import { apiUrl, locale } from '../../config';
-import CropWindow from '../views/components/crop-window.vue';
import ProgressDialog from '../views/components/progress-dialog.vue';
export default ($root: any) => {
- const cropImage = file => new Promise((resolve, reject) => {
+ const cropImage = file => new Promise(async (resolve, reject) => {
+ const CropWindow = await import('../views/components/crop-window.vue').then(x => x.default);
const w = $root.new(CropWindow, {
image: file,
title: locale['desktop']['banner-crop-title'],