This is a boilerplate project with Next.js v10 and Tailwind v2.
First, run the development server:
npm run dev
# or
yarn dev
Open http://localhost:3000 with your browser to see the result.
We use ESLint and Prettier to ensure the coding style is always the same.
To make ESLint errors visible in VSCode, you need to install the ESLint plugin.
I also recommend you tell VSCode to auto-fix ESLint errors on Save. To do so, create a .vscode/settings.json
file with the following content:
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
}
Now let's configure VSCode to actually format our code on save according to our prettier configuration file. To do so, install VSCode's prettier plugin.
Then, you can tell VSCode to format the code on Save by editing our .vscode/settings.json
file:
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.