Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sirwanafifi/vite-plugin-csv

Import CSV files in your vite projects
https://github.com/sirwanafifi/vite-plugin-csv

csv react vite vite-plugin vitejs vue

Last synced: about 1 month ago
JSON representation

Import CSV files in your vite projects

Awesome Lists containing this project

README

        

# vite-plugin-csv

CSV loader for Vite

## Install

Install

```bash
yarn add vite-plugin-csv -D
```

Add it to `vite.config.js`

```ts
// vite.config.js
import CSV from "vite-plugin-csv";

export default {
plugins: [CSV()],
};
```

## Usage

- [React example](/examples/react)
- [Vue example](/examples/vue)

## TypeScript Shim

```ts
declare module "*.csv" {
export default <{[key: string]: any}>[];
}
```