An esbuild plugin that enables importing .tsv and .csv files as ES6 modules. Current stable version is 0.0.4. It uses d3-dsv under the hood to parse tabular data and returns a DSVRowArray (array of objects). The plugin supports a transform option to mutate parsed data before bundling. Compared to other CSV loaders for esbuild, this plugin is minimal and focused, but it has very low maintenance activity and may not be suitable for production use due to its early stage.
npm install esbuild-plugin-dsvNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Registers the DSV plugin with esbuild, allowing import of .csv and .tsv files in bundled code.
Ensure imported CSV/TSV files are valid tabular data with headers.
Transform the data manually using d3-dsv's csvParse with custom options.
Pin exact version in package.json and test upgrades thoroughly.
Run npm install --save-dev esbuild-plugin-dsv
Use import { dsvPlugin } from 'esbuild-plugin-dsv' instead of import dsvPlugin from ...