Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tailwind webpack build time improvements #65

Merged
merged 2 commits into from Feb 3, 2021

Conversation

holehan
Copy link
Member

@holehan holehan commented Feb 3, 2021

Significantly reduce webpack build and rebuild times by disabling sourcemaps and splitting up tailwind imports within webpack.

Sourcemaps are nice-to-have but come with a high cost: they add up to the already not so great build and rebuild times. Due to our component and utility based approach to styling we won't write that much custom CSS anyway, so let's just disable sourcemaps and save us some time.

Splitting up tailwind imports into chunks lets webpack reimport only the css files that actually changed. This cuts down rebuild times < 1s 馃帀

See tailwindlabs/tailwindcss#2820
See https://nystudio107.com/blog/speeding-up-tailwind-css-builds

@holehan holehan merged commit 656c507 into master Feb 3, 2021
@holehan holehan deleted the tailwind-webpack-speed-improvements branch April 28, 2021 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant