Skip to content

Instantly share code, notes, and snippets.

@coreymcmahon
Created November 20, 2021 07:45
Show Gist options
  • Save coreymcmahon/381911955c6dfb31af809493063bf4c3 to your computer and use it in GitHub Desktop.
Save coreymcmahon/381911955c6dfb31af809493063bf4c3 to your computer and use it in GitHub Desktop.
Set up Gatsby + TypeScript + Tailwind CSS
# Install Gatsby starter w/ TypeScript support
gatsby new project-name https://github.com/jpedroschmitz/gatsby-starter-ts
# Install Tailwind
npm install -D gatsby-plugin-postcss tailwindcss@latest postcss@latest autoprefixer@latest && npx tailwindcss init -p
# Update gatsby-config.js to include:
# plugins: ['gatsby-plugin-postcss'],
# Create global.css:
#
# /* ./src/styles/global.css */
# @tailwind base;
# @tailwind components;
# @tailwind utilities;
# Create ./gatsby-browser.js:
# import './src/styles/global.css';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment