New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Step 4: Tailwind 0.6.2 and file size improvements #6

Merged
merged 4 commits into from Jul 12, 2018

Conversation

1 participant
@stefanzweifel
Owner

stefanzweifel commented Jul 12, 2018

Tailwind 0.6.2 has been released and comes with a new feature: shadowLookup.

From the release notes:

You can now use @apply to apply classes that aren't defined but would exist if @tailwind utilities was included in the same CSS file. This is mostly useful on projects that are setup to process multiple styles independently, for example a Vue.js project where you are using the <style> block of your single file components.

These updates fix the core problem I was facing in this demo project. The @tailwind utilities; had to be added at the start of every <style> block in every Vue component. This caused the final JavaScript Bundle size to grow with every newly added component.
With Tailwind 0.6.2 this problem goes away. The previous minified Bundle clocked in at 1.9MB. The new minified Bundle is only 99kb in size. That's 95% smaller!

Another cool benefit of this approach: You don't need purgecss or any other tool that removes unused CSS.


So with the setup of this repo and the article I've written back in February, I think you start leveraging the power of Tailwind CSS in your Vue.js project (I certainly will).

It also closes #5.

@stefanzweifel stefanzweifel merged commit e2e99b4 into master Jul 12, 2018

@stefanzweifel stefanzweifel deleted the upgrade-to-tailwind-0.6 branch Jul 12, 2018

@stefanzweifel stefanzweifel restored the upgrade-to-tailwind-0.6 branch Jul 12, 2018

@stefanzweifel stefanzweifel changed the title from Tailwind 0.6.2 and file size improvements to Step 4: Tailwind 0.6.2 and file size improvements Jul 12, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment