Modern JS development
What is Modern JS development
簡単的に言うと、ES5以後のSyntaxを利用する
Why we need Modern JS?
3. Try to get rid of node_modules
考え方面
Code
map, filter, =>, async/await など
Tools
今日は Tools 周りを話す、メインは Vite Vite は何ですか?
Next generation frontend tooling. It's fast!
簡単的に言うと、
native ES modules を活用して、webpack ような dev/bundle ツールです。
Compare Vite and vue-cli(Webpack)
Why Vite fast
webpack は source code を全部読み込んで処理する後、Server ready
https://gyazo.com/497a11eb004f689c5926a45fe31e3404
vite は Server ready 後、ESM で source code を読む
https://gyazo.com/98878ebc6ebd67bd22d2c4191f8a4877
onuma.icon ES Modulesがそのままimportできるようになったのは大きいですよね!
Other Tools
What I think about it?
確かに fast
しかし SSR framework はまだ対応しない
積極的に検証して、勇気を持って small project に使う
refs