Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mizchi/next-amp-tailwind-purgecss
https://github.com/mizchi/next-amp-tailwind-purgecss
amp next postcss purgecss tailwindcss
Last synced: 4 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/mizchi/next-amp-tailwind-purgecss
- Owner: mizchi
- Created: 2020-05-10T07:58:50.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T05:28:05.000Z (almost 2 years ago)
- Last Synced: 2023-03-11T05:02:29.343Z (over 1 year ago)
- Topics: amp, next, postcss, purgecss, tailwindcss
- Language: TypeScript
- Homepage:
- Size: 1.43 MB
- Stars: 8
- Watchers: 1
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# next + amp + tailwind + purgecss example
## How to develop
```bash
# development
yarn dev # localhost:3000# build
yarn build # gen out/
```## How it works.
- Build `style/bundle.css` by `postcss-cli`
- See `postcss.config.js`
- `purgecss` watches `pages/*` and `components/*`
- `pages/_document.tsx` includes it as raw.## Why
- Next.js amp mode is great.
- AMP custom style has css size limit.
- Tailwind is big.So I need to purge unused css.
## Reference
https://dev.to/geekplux/how-to-use-tailwindcss-with-amp-in-a-next-js-project-1f97
## LICENSE
MIT