[Client] Enable code splitting
And some optimizations
This commit is contained in:
@ -1,8 +1,10 @@
|
||||
const crypto = require('crypto');
|
||||
// スクリプトサイズがデカい
|
||||
//const crypto = require('crypto');
|
||||
|
||||
export default (data: ArrayBuffer) => {
|
||||
const buf = new Buffer(data);
|
||||
const hash = crypto.createHash("md5");
|
||||
hash.update(buf);
|
||||
return hash.digest("hex");
|
||||
};
|
||||
//const buf = new Buffer(data);
|
||||
//const hash = crypto.createHash("md5");
|
||||
//hash.update(buf);
|
||||
//return hash.digest("hex");
|
||||
return '';
|
||||
};
|
||||
|
@ -7,7 +7,8 @@
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import { lib } from 'emojilib';
|
||||
// スクリプトサイズがデカい
|
||||
//import { lib } from 'emojilib';
|
||||
|
||||
export default Vue.extend({
|
||||
props: {
|
||||
@ -50,10 +51,10 @@ export default Vue.extend({
|
||||
this.customEmoji = customEmoji;
|
||||
this.url = customEmoji.url;
|
||||
} else {
|
||||
const emoji = lib[this.name];
|
||||
if (emoji) {
|
||||
this.char = emoji.char;
|
||||
}
|
||||
//const emoji = lib[this.name];
|
||||
//if (emoji) {
|
||||
// this.char = emoji.char;
|
||||
//}
|
||||
}
|
||||
} else {
|
||||
this.char = this.emoji;
|
||||
|
@ -1,5 +1,4 @@
|
||||
import * as getCaretCoordinates from 'textarea-caret';
|
||||
import MkAutocomplete from '../components/autocomplete.vue';
|
||||
import { toASCII } from 'punycode';
|
||||
|
||||
export default {
|
||||
@ -123,7 +122,7 @@ class Autocomplete {
|
||||
/**
|
||||
* サジェストを提示します。
|
||||
*/
|
||||
private open(type, q) {
|
||||
private async open(type, q) {
|
||||
if (type != this.currentType) {
|
||||
this.close();
|
||||
}
|
||||
@ -143,6 +142,8 @@ class Autocomplete {
|
||||
this.suggestion.y = y;
|
||||
this.suggestion.q = q;
|
||||
} else {
|
||||
const MkAutocomplete = await import('../components/autocomplete.vue').then(m => m.default);
|
||||
|
||||
// サジェスト要素作成
|
||||
this.suggestion = new MkAutocomplete({
|
||||
parent: this.vm,
|
||||
|
@ -13,7 +13,7 @@ import { url } from '../../../config';
|
||||
export default Vue.extend({
|
||||
i18n: i18n('desktop/views/components/game-window.vue'),
|
||||
components: {
|
||||
XReversi: () => import('../../../common/views/components/games/reversi/reversi.vue')
|
||||
XReversi: () => import('../../../common/views/components/games/reversi/reversi.vue').then(m => m.default)
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -9,7 +9,7 @@ import Vue from 'vue';
|
||||
|
||||
export default Vue.extend({
|
||||
components: {
|
||||
XReversi: () => import('../../../../common/views/components/games/reversi/reversi.vue')
|
||||
XReversi: () => import('../../../../common/views/components/games/reversi/reversi.vue').then(m => m.default)
|
||||
},
|
||||
props: {
|
||||
ui: {
|
||||
|
@ -12,7 +12,7 @@ import i18n from '../../../../i18n';
|
||||
export default Vue.extend({
|
||||
i18n: i18n('mobile/views/pages/games/reversi.vue'),
|
||||
components: {
|
||||
XReversi: () => import('../../../../common/views/components/games/reversi/reversi.vue')
|
||||
XReversi: () => import('../../../../common/views/components/games/reversi/reversi.vue').then(m => m.default)
|
||||
},
|
||||
mounted() {
|
||||
document.title = `${this.$root.instanceName} %i18n:@reversi%`;
|
||||
|
@ -10,7 +10,7 @@
|
||||
"declaration": false,
|
||||
"sourceMap": false,
|
||||
"target": "es2017",
|
||||
"module": "commonjs",
|
||||
"module": "esnext",
|
||||
"removeComments": false,
|
||||
"noLib": false,
|
||||
"strict": true,
|
||||
|
Reference in New Issue
Block a user