shopify-theme-tailwind

A starting point for Shopify Online Store 2.0 theme development using Tailwind CSS and Vite.

MIT License

Stars
146
Committers
2
shopify-theme-tailwind - v2.2.1 Latest Release

Published by wesselvanree almost 2 years ago

What's Changed

Full Changelog: https://github.com/wesselvanree/shopify-theme-tailwind/compare/v2.2.0...v2.2.1

shopify-theme-tailwind - v2.2.0

Published by wesselvanree about 2 years ago

What's Changed

  • Migrate to Vite (replaces Webpack and PostCSS CLI)
  • Fix stale chunks after multiple deploys
  • Add support for multiple PostCSS entries in the styles directory
  • Reduce the number of dependencies
  • Update and simplify npm scripts

Migrate an existing project to Vite

Update your package.json and remove .babelrc and webpack.config.js and copy vite.config.ts. The folder structure has not changed, but you have to import src/index.css in src/entries/index.ts, and CSS files will be built to shopify/assets/[name].min.css so make sure you change your *.liquid files accordingly.

To make things easier, I wrote a bash script that does the migration for you:

  1. cd into your project root
  2. Make sure there does not exist a ../temp-sttw/ directory. If it exists, rename it or remove it.
  3. Run the following commands from your project root:
git checkout -b migrate-v2.2.0
rm -rf .babelrc webpack.config.js helpers/ scripts/ .vscode/ postcss.config.js
git clone [email protected]:wesselvanree/shopify-theme-tailwind.git ../temp-sttw
git --git-dir ../temp-sttw/.git checkout 4e81d96
mv ../temp-sttw/vite.config.ts ../temp-sttw/*.json ../temp-sttw/scripts ../temp-sttw/.gitignore* ../temp-sttw/.vscode/ ../temp-sttw/.postcss.config.cjs ./
npm install
rm -rf ../temp-sttw/
  1. Install your custom dependencies in package.json and postcss.config.cjs
  2. Import src/index.css in src/entries/index.ts
  3. Vite should be able to run now! You could take a look at other config changes like the Tailwind config and copy those changes.

Full Changelog: https://github.com/wesselvanree/shopify-theme-tailwind/compare/v2.1.3...v2.2.0

shopify-theme-tailwind - v2.1.3

Published by wesselvanree about 2 years ago

shopify-theme-tailwind - v2.1.2

Published by wesselvanree over 2 years ago

shopify-theme-tailwind - v2.1.1

Published by wesselvanree over 2 years ago

What's changed

  • Simplify src directory
  • Update dependencies

Full Changelog: https://github.com/wesselvanree/shopify-theme-tailwind/compare/v2.1.0...v2.1.1

shopify-theme-tailwind - v2.1.0

Published by wesselvanree over 2 years ago

What's Changed

  • Refactor webpack.config.js
  • Add support for dynamic imports
  • Resolve bundle naming errors when using deeply nested subfolders in the entries folder

Full Changelog: https://github.com/wesselvanree/shopify-theme-tailwind/compare/v2.0.3...v2.1.0

shopify-theme-tailwind - v2.0.3

Published by wesselvanree almost 3 years ago

shopify-theme-tailwind - v2.0.2

Published by wesselvanree about 3 years ago

Changed

  • Only purge .liquid, .tsx, .ts, .jsx, .js files with tailwindcss.

Full Changelog: https://github.com/wesselvanree/shopify-theme-tailwind/compare/v2.0.1...v2.0.2

shopify-theme-tailwind - v2.0.1

Published by wesselvanree about 3 years ago

Fixed

  • Fixed Webpack build errors when using React with Typescript

Full Changelog: https://github.com/wesselvanree/shopify-theme-tailwind/compare/v2.0.0...v2.0.1

shopify-theme-tailwind - v2.0.0

Published by wesselvanree about 3 years ago

Added

  • Typescript support
  • Move all Shopify related files and folders to shopify folder
  • Github action to check for build errors on Pull Request

Changed

  • Github actions to support new folder structure
  • Scripts in package.json
  • Update Dawn theme from Shopify/dawn repo

Fixed

  • Github Action now builds Webpack in production mode
shopify-theme-tailwind - Initial release

Published by wesselvanree about 3 years ago

Related Projects