Author: catsheue
Assetpack
resolutions: {
default: 1,
low: 0.5,
},
這個一定要指定default跟low,不能只指定一個,不然default的圖片尺寸還會是原本的尺寸。
如何看iPhone的log
打開Xcode
選Window > Devices
選自己要看的裝置
點 Open Console
memory專門研究
pnpm monorepo
https://pnpm.io/pnpm-workspace_yaml
看這個檔案怎麼設定
pnpm add gsap -r
用這個指令幫每一個package加套件
如果要用assetpack,在package要加上
"type": "module",

IOS Browser閃退集錦
default font size
Most browsers set 16px as the default font size. This is a universal web standard.
/* Check current root element size */
html {
font-size: 16px; /* default value */
}
/* Common adjustment method */
html {
font-size: 62.5%; /* sets root element to 10px (16px * 62.5% = 10px) */
}
如果預設是16px,從21px要換算成rem
21 ÷ 16 = 1.3125rem
這樣換算有點麻煩,所以有的人會直接把預設字型改成62.5%
那就只要這樣算就好了:
(21 ÷ 10 = 2.1)
Domain name 購買研究
想要搬家換成用VPS,但是又想要無縫接軌,先來買個domain name在那邊先建好好了…
https://tld-list.com
Domain name 比價
前端優化專門站
讀Next.js文件
貼一些讀文件的備註心得。
Rendering: Server Components | Next.js
Data Fetching: Server Components allow you to move data fetching to the server, closer to your data source. This can improve performance by reducing time it takes to fetch data needed for rendering, and the number of requests the client needs to make.
要跟DB要資料…當然是離DB越近越好⊙o⊙
Security: Server Components allow you to keep sensitive data and logic on the server, such as tokens and API keys, without the risk of exposing them to the client.
就像是保險箱一樣…機密的資料放在server更好。