{"id":25333,"library":"esbuild-plugin-dsv","title":"esbuild-plugin-dsv","description":"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.","status":"active","version":"0.0.4","language":"javascript","source_language":"en","source_url":"https://github.com/martonlederer/esbuild-plugin-dsv","tags":["javascript","typescript"],"install":[{"cmd":"npm install esbuild-plugin-dsv","lang":"bash","label":"npm"},{"cmd":"yarn add esbuild-plugin-dsv","lang":"bash","label":"yarn"},{"cmd":"pnpm add esbuild-plugin-dsv","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency for plugin integration","package":"esbuild","optional":false},{"reason":"Used internally for CSV/TSV parsing","package":"d3-dsv","optional":false}],"imports":[{"note":"The plugin is exported as a named export, not default. CommonJS users should use const { dsvPlugin } = require('esbuild-plugin-dsv').","wrong":"import dsvPlugin from 'esbuild-plugin-dsv'","symbol":"dsvPlugin","correct":"import { dsvPlugin } from 'esbuild-plugin-dsv'"},{"note":"Type import for TypeScript users; not available in JavaScript.","symbol":"DSVPluginOptions","correct":"import type { DSVPluginOptions } from 'esbuild-plugin-dsv'"},{"note":"DSVRowArray is a type re-exported from d3-dsv; use type import only.","wrong":"import { DSVRowArray } from 'esbuild-plugin-dsv'","symbol":"DSVRowArray","correct":"import type { DSVRowArray } from 'esbuild-plugin-dsv'"}],"quickstart":{"code":"const esbuild = require('esbuild');\nconst { dsvPlugin } = require('esbuild-plugin-dsv');\n\nasync function build() {\n  await esbuild.build({\n    entryPoints: ['src/index.js'],\n    bundle: true,\n    outfile: 'dist/bundle.js',\n    plugins: [dsvPlugin()],\n  });\n}\n\nbuild();","lang":"typescript","description":"Registers the DSV plugin with esbuild, allowing import of .csv and .tsv files in bundled code."},"warnings":[{"fix":"Ensure imported CSV/TSV files are valid tabular data with headers.","message":"Plugin does not validate CSV/TSV file extensions; any file imported with .csv or .tsv extension will be parsed, potentially causing errors on malformed data.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Transform the data manually using d3-dsv's csvParse with custom options.","message":"The plugin does not support custom delimiter or quoting; it uses d3-dsv defaults which assume comma separated values and double quotes.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Pin exact version in package.json and test upgrades thoroughly.","message":"Version 0.0.4 is very early; breaking changes may occur without major version bump.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run npm install --save-dev esbuild-plugin-dsv","cause":"Package is not installed.","error":"Error: Cannot find module 'esbuild-plugin-dsv'"},{"fix":"Use import { dsvPlugin } from 'esbuild-plugin-dsv' instead of import dsvPlugin from ...","cause":"Importing default instead of named export.","error":"TypeError: dsvPlugin is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}