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?

More than 3 years have passed since last update.

Next.js メモ

Last updated at Posted at 2021-08-21

Nextjsプロジェクト作成まで

利用技術

  • Next.js
  • TypeScript

プロジェクト作成

$ npx create-next-app <project-name>

TypeScript導入

$ touch tsconfig.json
$ yarn add --dev typescript @types/react @types/node
$ yarn dev

既存ファイルの拡張子を変更

$ find pages -name "_app.js" -or -name "index.js" | sed 'p;s/.js$/.tsx/' | xargs -n2 mv & \
  find pages/api -name "*.js" | sed 'p;s/.js$/.ts/' | xargs -n2 mv
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?