
Photo by
takerumax_photo
Next.js 初級編 #React #javascript
■ 概要:
Next.js の、導入などの内容となります
SSR っぽいので。HTMLタグ等をサーバー側で。
出力してくれるみたいです
■ 参考
https://nextjs.org/learn/basics/create-nextjs-app
https://qiita.com/hiraike32/items/71b14755f56208a8a133
■ 追加
公式の内容ですが、
npx create-next-app app1 --use-npm --example "https://github.com/vercel/next-learn-starter/tree/master/learn-starter"
・起動
npm run dev
又は、
yarn dev
・デプロイ 設定
package.json を、修正する必要がありました。
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"export": "next export",
"deploy": "npm run build && npm run export"
},
・デプロイ
npm run deploy
又は、
yarn deploy
・outフォルダが作成されるので。
クラウド等に、コピーします