简体   繁体   中英

React js importing a large data file (json)

I have a large JSON file (700MB), it's a search engine index.

the problem is when I run the start script it stays at the compile stage forever. and I tried to build the whole project but it responds with

out of memory (by the way, I give it more than 20 GB, and still the same)

all I want to do is to import this file earlier ( unfortunately all features based on this file )

You will need to reevaluate and re-engineer your architecture and how you handle the data. The prevelant approach is to have a server with an endpoint providing the data. Your React app should load small in size, and get the data to work with from the endpoint.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM