0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

始めてQwik使ってみたメモ

Posted at

新規サイトのフレームワーク選定でQwikを触ってみたので、メモ代わりに気づいたことを記載。
触り始めたばかりなので、何かあれば追記していく予定。

yarn使う場合はv3以降が良さげ

特に公式サイト
https://qwik.dev/docs/getting-started/
にも記載がないけども、多分yarnのv3以上じゃないと動かない。

yarn create qwik

で以下のようなエラーが出た

# yarn create qwik
yarn create v1.22.22
[1/4] Resolving packages...
[2/4] Fetching packages...
warning create-qwik@1.14.0: The engine "pnpm" appears to be invalid.
error create-qwik@1.14.0: The engine "yarn" is incompatible with this module. Expected version ">=3.0.0". Got "1.22.22"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/create for documentation about this command.

yarnのバージョンを3以上にしろというので、corepackでyarnを最新版にしてリトライしたら成功した。
普段、Dockerのnodeイメージを使っているため、初期状態のyarn v1を使っていたのでここで引っかかった。
もしかしたらnpmでcreateしたあとyarn installでも動くかもしれないけど推奨されないと思う。

bodyタグに変更を加えにくい

割と衝撃的だったのでメモ。
サイト全体でroot.tsxにheadとbodyを記載するので、bodyタグ自体にclassを入れるとサイト全体で共通で使うことになる。
通常のレイアウト組む場合は全然問題ないのだけども、
画面を上下にスクロールさせたときの余白の色はbodyの背景色になるので背景色が異なる画面を作る場合に微妙だなと。
何かしら変更する手段はあるのかもしれないけども、いかんせん資料が少ない…

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?