最終更新:2023-08-25 (金) 11:32:42 (248d)
vite
Top / vite
Vite 開発サーバをカレントディレクトリで起動します。
コマンド
- vite [root] : start dev server
- vite build [root] : build for production
- vite optimize? [root] : pre-bundle dependencies
- vite preview [root] : locally preview production build
設定ファイル
package.json/scripts
npm run dev vite 開発サーバを起動。エイリアス: `vite dev`, `vite serve` npm run build vite build プロダクション用にビルド npm run preview? vite preview プロダクション用ビルドをローカルでプレビュー
npx vite --help?
vite/4.4.9 Usage: $ vite [root] Commands: [root] start dev server build [root] build for production optimize [root] pre-bundle dependencies preview [root] locally preview production build For more info, run any command with the `--help` flag: $ vite --help $ vite build --help $ vite optimize --help $ vite preview --help Options: --host [host] [string] specify hostname --port <port> [number] specify port --https [boolean] use TLS + HTTP/2 --open [path] [boolean | string] open browser on startup --cors [boolean] enable CORS --strictPort [boolean] exit if specified port is already in use --force [boolean] force the optimizer to ignore the cache and re-bundle -c, --config <file> [string] use specified config file --base <path> [string] public base path (default: /) -l, --logLevel <level> [string] info | warn | error | silent --clearScreen [boolean] allow/disable clear screen when logging -d, --debug [feat] [string | boolean] show debug logs -f, --filter <filter> [string] filter debug logs -m, --mode <mode> [string] set env mode -h, --help Display this message -v, --version Display version number