Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/lorenzoc25/vite-plugin-xml-loader

Lightweight Vite plugin that converts all XML to JSON
https://github.com/lorenzoc25/vite-plugin-xml-loader

json vite vite-plugin xml-parsing

Last synced: 2 months ago
JSON representation

Lightweight Vite plugin that converts all XML to JSON

Awesome Lists containing this project

README

        

# vite-plugin-xml-loader
![forthebadge](https://forthebadge.com/images/badges/made-with-typescript.svg)
![forthebadge](https://forthebadge.com/images/badges/built-with-love.svg)

Automatically transform all xml files to json buffer

## Install
```bash
npm i vite-plugin-xml-loader --save
```
## Usage
In your `vite.config.js` or `vite.config.ts` file, do
```ts
import { defineConfig } from 'vite'
...
import XMLLoader from 'vite-plugin-xml-loader'

...
export default defineConfig({
plugins: [
...
XMLLoader(),
]
})
```
and the plugin should be ready to use.
## Testing
This plugin is also testable and there's a test script ready. To test it yourself, you can clone this repository and do
```
npm test
```
## License
[MIT License](https://opensource.org/licenses/MIT)