Skip to content

Vite is very slow if a large GeoJson file is in the backend folder #17699

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

Closed
emaia opened this issue Apr 16, 2025 · 2 comments · Fixed by #17700
Closed

Vite is very slow if a large GeoJson file is in the backend folder #17699

emaia opened this issue Apr 16, 2025 · 2 comments · Fixed by #17700

Comments

@emaia
Copy link

emaia commented Apr 16, 2025

What version of Tailwind CSS are you using?

v4.1.4 (the problem starts from 4.0.10)

What build tool (or framework if it abstracts the build tool) are you using?

Laravel 12, Vite ^6.2.4, @tailwindcss/vite ^4.1.4

What version of Node.js are you using?

v20.9.0 | v22.14.0

What operating system are you using?

System:
    OS: Linux 5.15 Ubuntu 24.04.2 LTS 24.04.2 LTS (Noble Numbat)
    CPU: (32) x64 AMD Ryzen 9 5950X 16-Core Processor
    Memory: 6.89 GB / 14.63 GB
    Container: Yes
    Shell: 5.9 - /usr/bin/zsh
  Binaries:
    Node: 22.14.0 - ~/.nvm/versions/node/v22.14.0/bin/node
    npm: 10.9.2 - ~/.nvm/versions/node/v22.14.0/bin/npm
    bun: 1.2.9 - ~/.bun/bin/bun
  npmPackages:
    vite: ^6.2.4 => 6.2.6

Reproduction URL

https://github.com/emaia/laravel/tree/vite-bug

Describe your issue

I'm working on a Laravel project that uses Vite. Everything was working great, but after adding a GeoJson file in a backend folder, Vite started running very slowly. Build runs changed from 400ms to 1m17s. Dev is also very slow.

This GeoJson file is unrelated to the frontend stuff and not referenced by any JS/CSS code.

Steps to reproduce

  • Clone the repo https://github.com/emaia/laravel/tree/vite-bug
    (It's just a fork from laravel/laravel + 19mb geojson file)
  • npm install, npm run build (runs slow)
  • Delete the file database/seeders/payload/limites_munic_rj.geojson and rerun build. It runs fast.
  • If revert @tailwindcss/vite to 4.0.9 or change css to import 'tailwindcss' source(none); it runs fast.
  • Starting from @tailwindcss/vite v4.0.10, something happens.

Originally posted by @emaia in #16911

@adamwathan
Copy link
Member

Hey! We should probably ignore .geojson files by default. In the mean time you should be able to add this to speed things up:

@source not "./**/*.geojson";

Let me know if that works!

@emaia
Copy link
Author

emaia commented Apr 16, 2025

Hey! We should probably ignore .geojson files by default. In the mean time you should be able to add this to speed things up:

@source not "./**/*.geojson";

Let me know if that works!

With @source not "../../**/*.geojson";, works!
(considering my app.css is in resources/css)

Tks!

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 a pull request may close this issue.

2 participants