Geojson files in /public choking build process
Answered
Oriental posted this in #help-forum
OrientalOP
We are building a pretty complex mapping project that is worked on by a medium-sized team. The other people collaborating on the project are not developers but are technical, and can add data to the public folder, then configure how that is displayed.
Inevitably they have at times put massive files in /public which broke the compilation process. Now all large files (> 8MB) are now stored on a web server and not in the repo.
However, we are still finding that medium sized files are choking the build process.
1. We are fetching data at runtime, not build time.
2. using fetch() rather than fs or import, so next shouldn't bundle or pre-load any of these files, right?
I should also say that this is intermittent, if you remove all the files and add them back one-by-one is usually works, which makes me think it's a memory/caching issue?
Would really appreciate any insight into this. We have only noticed this since starting a new version of the project in Next 15.
PS: yes we would love ALL of these files to be in object-storage, but the team would like to be able to work locally as well, at least during development
Inevitably they have at times put massive files in /public which broke the compilation process. Now all large files (> 8MB) are now stored on a web server and not in the repo.
However, we are still finding that medium sized files are choking the build process.
1. We are fetching data at runtime, not build time.
2. using fetch() rather than fs or import, so next shouldn't bundle or pre-load any of these files, right?
I should also say that this is intermittent, if you remove all the files and add them back one-by-one is usually works, which makes me think it's a memory/caching issue?
Would really appreciate any insight into this. We have only noticed this since starting a new version of the project in Next 15.
PS: yes we would love ALL of these files to be in object-storage, but the team would like to be able to work locally as well, at least during development
Answered by Oriental
After many hours debugging this 🤪 I realised you need to ignore the public directory from Tailwind. This has only been possible for 2 weeks from this PR:
https://github.com/tailwindlabs/tailwindcss/pull/17255
I hope this helps someone else down the line!
https://github.com/tailwindlabs/tailwindcss/pull/17255
I hope this helps someone else down the line!
1 Reply
OrientalOP
After many hours debugging this 🤪 I realised you need to ignore the public directory from Tailwind. This has only been possible for 2 weeks from this PR:
https://github.com/tailwindlabs/tailwindcss/pull/17255
I hope this helps someone else down the line!
https://github.com/tailwindlabs/tailwindcss/pull/17255
I hope this helps someone else down the line!
Answer