With reactjs, I tried to use fs to read a text file line by line, but then the compiler complains "Module not found: Error: Can't resolve 'fs'. I browsed the internet, it's well known reactjs bug for webpack 5, people asked to go down to webpack 4.
I have the following questions:
How to go down from webpack 5 to webpack 4? Will it be affect the other codes?
Is there any other way to read text file line by line without using fs?
Thanks!