jack-pallot / dogpatch

A WordPress starter theme including Webpack (via Laravel Mix), Vue, Babel and Tailwind CSS.
https://github.com/jack-pallot/dogpatch
51 stars 6 forks source link

Issues with AutoPrefixer and PurgeCSS Using Tailwind 1.1.2 #5

Open tmswr opened 5 years ago

tmswr commented 5 years ago

Hello Jack!

I've run into an issue with trying to use a more up to date version of Tailwind. Whenever I update tailwind.config.js and change the file names from tailwind-config.js in webpack.mix.js to tailwind.config.js, the correct CSS is generated, but there is no Auto Prefixing and Purge CSS seems not touch the css. I've went through the Tailwind docs, is there any more customization needed with the way it's set up?

jack-pallot commented 5 years ago

There's a slight difference in how Autoprefixer finds your recommended browser list now, it uses a file called .browserlistrc.

I've pushed up a branch called 1.0-dev, which is still a work in progress, but uses Laravel Mix 5.0, Babel 7, Webpack 4, and Tailwind 1.1.2. You might as well upgrade all of these, since the Tailwind upgrade is by far the most comprehensive. I have managed to get PurgeCSS and Autoprefixer working with Tailwind 1.0 in this environment.

You should be able up upgrade by adding / changing the following (assuming Tailwind has already been upgraded to 1.1.2 successfully):

package.json (delete node_modules & re-install) .browserslistrc webpack.mix.js

I would also recommend branching this first in case you need to merge or rollback.