traPtitech / traQ_S-UI

traQ S - traP Internal Messenger Application Frontend
MIT License
107 stars 40 forks source link

vue3への移行 #1295

Closed sapphi-red closed 3 years ago

sapphi-red commented 4 years ago

ライブラリの対応は大体できてるっぽい(コンポーネント系はそうでもないかも) vue-codemodあたりがよさげになったら移行が楽になりそうだからそのくらいにやるのがよさそう

ビルド周り

ライブラリ

リファクタ

その他

sapphi-red commented 4 years ago

常にIDがvalidになるようにする

portal-vueのvue3対応版が出ればそのまま移行できるけど別に必要な箇所そんなにないので書き換えたほうがよさそうな気がする

sapphi-red commented 4 years ago

メモ: vue-textarea-autosize

  1. vue-cliがv3でvue3に対応してないので、4.5.6にアップデート
  2. vueを3.0.0にして、vue-template-compilerを消して@vue/compiler-sfc@3.0.0を入れる
  3. node_modules/vue-cli-plugin-p11nに移動して、rollup-plugin-vue6.0.0-beta.10にアップデート(そこでnpm i)
  4. vueをdevDepからdependenciesに移動(これしないとvue本体が出力に混ざる)
  5. 元の場所でnpm run build
sapphi-red commented 4 years ago

vue-slider-componentについて

vue-slider-componentはTSX + vue-class-component + vue-property-decoratorで開発されてる

TSXは問題なくVue3で対応 vue-class-componentもvue3対応ベータが出てる https://github.com/vuejs/vue-class-component/tree/next vue-property-decoratorは出てくるか怪しいかも?今のとこ何もないけど見てはいるっぽい kaorun343/vue-property-decoratorの#.294

今すぐにやるのは厳しそう

sapphi-red commented 4 years ago

https://github.com/traPtitech/traQ_S-UI/pull/1422#discussion_r499625754

sapphi-red commented 4 years ago

TODO: vue-slider-component@nextが出たのでそれに差し替える https://jsfiddle.net/3ea4qbg9/1/

sapphi-red commented 3 years ago

emitsの記述に関しては #2216 に移動