A webpack loader that imports CSV files as JSON with automatic type conversion using Papa Parse. Version 3.0.5 is current, released in 2022 with security updates for transitive dependencies. It supports TSV, DSV, and any delimited file by detecting delimiters. Compared to raw Papa Parse, it integrates seamlessly into webpack builds and provides type coercion (dynamicTyping) by default. Maintenance is infrequent, but compatibility extends to webpack 4 and 5. Not recommended for large streaming files; limited to synchronous loading.
npm install csv-loaderVerified import paths — ran on the pinned version, not inferred.
Configure webpack to use csv-loader with Papa Parse options, then import CSV files as typed JSON arrays.
Run npm install --save-dev papaparse
Upgrade to webpack 5 or remove manual loader-utils reference.
Set dynamicTyping: false or provide explicit schema.
Add options.delimiter explicitly if not comma.
Use a different streaming parser for huge datasets.
Run npm install --save-dev papaparse
Ensure options is an object, e.g., { loader: 'csv-loader', options: {} }Set header: true or ensure file has multiple rows.
Run npm install --save-dev loader-utils