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

vue3への移行 #1295

Closed
22 of 23 tasks
sapphi-red opened this issue Jul 29, 2020 · 6 comments
Closed
22 of 23 tasks

vue3への移行 #1295

sapphi-red opened this issue Jul 29, 2020 · 6 comments
Assignees

Comments

@sapphi-red
Copy link
Contributor

sapphi-red commented Jul 29, 2020

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

ビルド周り

ライブラリ

リファクタ

  • emitsの記述
  • @~.native.nativeの除去
  • 一部のストアをprovide/injectに書き換え
    • MessageInput.vueとかMessageEditor.vueもprovide/injectに書き換え
  • websocketの受け取りを一括ではなくそれぞれのストア側で受け取るように
  • ArrayやRecordをSetやMapに書き換え Store architecture refactor #1699
  • テンプレート内でのoptional chaining、nullish coalescingの利用

その他

  • [Vue warn]: Extraneous non-props attributes (class, style) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.
  • [Vue warn]: setup() return property "$img" should not start with "$" or "_" which are reserved prefixes for Vue internals.
  • 下記

vue-router.esm-browser.js?954b:42 [Vue Router warn]: history.state seems to have been manually replaced without preserving the necessary values. Make sure to preserve existing history state if you are manually calling history.replaceState:

history.replaceState(history.state, '', url)

You can find more information at https://next.router.vuejs.org/guide/migration/#usage-of-history-state.

@sapphi-red
Copy link
Contributor Author

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

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

@sapphi-red
Copy link
Contributor Author

sapphi-red commented Sep 24, 2020

メモ: 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
Copy link
Contributor Author

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 sapphi-red self-assigned this Sep 25, 2020
@sapphi-red
Copy link
Contributor Author

#1422 (comment)

@sapphi-red
Copy link
Contributor Author

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

@sapphi-red
Copy link
Contributor Author

sapphi-red commented May 23, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant