When trying to use this library in a React project with Webpack, it fails to build and gives the following error:
229:20-27 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted
The problem seems to be the way require is being used in CSV.stream and CSV.stream.json functions. For my use case, I only required the parse method so I have commented these parts of the code and everything works fine.
When trying to use this library in a React project with Webpack, it fails to build and gives the following error:
229:20-27 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted
The problem seems to be the way
require
is being used inCSV.stream
andCSV.stream.json
functions. For my use case, I only required theparse
method so I have commented these parts of the code and everything works fine.