What are AMP sites? And how to use them with Next.js and Tailwindcss?
Firstly define the pages you want to use the amp for, by declaring
Move to _document.js
Now by default, you won't be having the raw-loader library, so download it by installing
Now your app will work smoothly in the development environment, but we have to do some extra work so that it works in production. First, let's declare an environment variable. CSS_ENV=build postcss styles/globals.css --config postcss.config.js -o styles/output.css Now, in postcss.config.js
Also, change _document.js as:
Done!! Voila, now you can deploy it.