Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vite #67

Closed
wants to merge 54 commits into from
Closed

Vite #67

wants to merge 54 commits into from

Conversation

tamaina
Copy link
Owner

@tamaina tamaina commented Apr 22, 2022

Viteのカナリア実装

misskey-dev#6845

  • Service Workerまわりのビルドを考えるのが面倒だったので、ベースがService Workerパッチになっています。
  • chartjs-plugin-gradient がなぜかmain指定がアカンと言われる。node-resolveとかcommonjsのプラグインを試してみてもダメ。
    //import gradient from 'chartjs-plugin-gradient';
    (ただ、そこからもっといろいろ弄った後には試していない)
  • requireを使うのが面倒そうだったのでimportを使うようにした

@tamaina
Copy link
Owner Author

tamaina commented Apr 22, 2022

なんかimport()が動作しない感じなんだけど、ブラウザ上で真面目に使ったことがないのでよくわかっていない

@tamaina
Copy link
Owner Author

tamaina commented Apr 22, 2022

https://stackblitz.com/edit/vitejs-vite-6nph1m?file=src/main.ts

なにか一工夫ないとだめっぽいな

@tamaina
Copy link
Owner Author

tamaina commented Apr 23, 2022

await import('./App.vue').then(x => x.default)にしたらいけた

@tamaina
Copy link
Owner Author

tamaina commented Apr 23, 2022

Misskeyはもともとそうだし…

@tamaina
Copy link
Owner Author

tamaina commented Apr 24, 2022

未解決

@tamaina
Copy link
Owner Author

tamaina commented Apr 26, 2022

@tamaina
Copy link
Owner Author

tamaina commented Apr 26, 2022

image

それで解決するなら質問してないっつーの!!!!!!!

@tamaina
Copy link
Owner Author

tamaina commented Apr 26, 2022

defineAsyncComponentを使えばstackblitsは動いたわ

https://stackblitz.com/edit/vitejs-vite-pmqny3?file=src/main.ts

https://misskey.dev/notes/8zjl4hnyz5

@tamaina
Copy link
Owner Author

tamaina commented Apr 26, 2022

次のエラー

image

image

@tamaina
Copy link
Owner Author

tamaina commented Apr 26, 2022

.filter(emojilist)のほうは直した

メモ: jsonのimportはdefaultになる

@tamaina
Copy link
Owner Author

tamaina commented Apr 26, 2022

npm run devでpugのclient_entry更新されないのをなんとかしたい…とは言っても面倒そう

(developmentではmanifest.jsonを直接参照するとかでいいかしら?でもパフォーマンス悪くなりそうだしビルドごとに更新するようにしたさはある

@tamaina
Copy link
Owner Author

tamaina commented Apr 26, 2022

import('*.vue')を全部defineAsyncComponentでラップする必要がある

@tamaina
Copy link
Owner Author

tamaina commented Apr 28, 2022

mountするdivを2つも作らないようにした

@tamaina
Copy link
Owner Author

tamaina commented Apr 29, 2022

Closeされたわもう二度とStackOverflow使わん(言い過ぎ)

ViteのDiscordサーバーで質問してみたけど返事が来ない

@tamaina
Copy link
Owner Author

tamaina commented Apr 30, 2022

FOUC、Safariでは再現しないし起動時だけの問題だから後でいいか

tamaina and others added 6 commits April 30, 2022 07:42
* clean up

* ev => data

* refactor

* clean up

* add type

* antenna

* channel

* fix

* add Packed type

* add PackedRef

* fix lint

* add emoji schema

* add reversiGame

* add reversiMatching

* remove signin schema (use Signin entity)

* add schemas refs, fix Packed type

* wip PackedHoge => Packed<'Hoge'>

* add Packed type

* note-reaction

* user

* user-group

* user-list

* note

* app, messaging-message

* notification

* drive-file

* drive-folder

* following

* muting

* blocking

* hashtag

* page

* app (with modifying schema)

* import user?

* channel

* antenna

* clip

* gallery-post

* emoji

* Packed

* reversi-matching

* update stream.ts

* misskey-dev#7769 (comment)

* fix lint

* clean up?

* add app

* fix

* nanka iroiro

* wip

* wip

* fix lint

* fix loginId

* fix

* refactor

* refactor

* remove follow action

* clean up

* Revert "remove follow action"

This reverts commit defbb41.

* Revert "clean up"

This reverts commit f94919c.

* remove fetch specification

* renoteの条件追加

* apiFetch => cli

* bypass fetch?

* fix

* refactor: use path alias

* temp: add submodule

* remove submodule

* enhane: unison-reloadに指定したパスに移動できるように

* null

* null

* feat: ログインするアカウントのIDをクエリ文字列で指定する機能

* null

* await?

* rename

* rename

* Update read.ts

* merge

* get-note-summary

* fix

* swパッケージに

* add missing packages

* fix getNoteSummary

* add webpack-cli

* ✌️

* remove plugins

* sw-inject分離したがテストしてない

* fix notification.vue

* remove a blank line

* disconnect intersection observer

* disconnect2

* fix notification.vue

* remove a blank line

* disconnect intersection observer

* disconnect2

* fix

* ✌️

* clean up config

* typesを戻した

* Update packages/client/src/components/notification.vue

Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com>

* disconnect

* oops

* Failed to load the script unexpectedly回避
sw.jsとlib.tsを分離してみた

* truncate notification

* Update packages/client/src/ui/_common_/common.vue

Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>

* clean up

* clean up

* キャッシュ対策

* Truncate push notification message

* クライアントがあったらストリームに接続しているということなので通知しない判定の位置を修正

* components/drive-file-thumbnail.vue

* components/drive-select-dialog.vue

* components/drive-window.vue

* merge

* fix

* Service Workerのビルドにesbuildを使うようにする

* return createEmptyNotification()

* fix

* i18n.ts

* update

* ✌️

* remove ts-loader

* fix

* fix

* enhance: Service Workerを常に登録するように

* pollEnded

* URLをsw.jsに戻す

* clean up

Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com>
Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
* refactor(client): refactor integration to use Composition API

* fix(client): drop superfluous enable* constants

* refactor(client): deduplicate window opening for services
* refactor(client): refactor instance-mute to use Composition API

* Apply review suggestion from @Johann150

Co-authored-by: Johann150 <johann@qwertqwefsday.eu>

* Apply review suggestion from @Johann150

Co-authored-by: Johann150 <johann@qwertqwefsday.eu>

Co-authored-by: Johann150 <johann@qwertqwefsday.eu>
@tamaina tamaina closed this May 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants