Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kraklin/vite-plugin-elm-debug-transformer
Vite plugin for adding elm-debug-transformer to the index.html page
https://github.com/kraklin/vite-plugin-elm-debug-transformer
Last synced: about 2 months ago
JSON representation
Vite plugin for adding elm-debug-transformer to the index.html page
- Host: GitHub
- URL: https://github.com/kraklin/vite-plugin-elm-debug-transformer
- Owner: kraklin
- License: mit
- Created: 2023-08-05T21:51:40.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-08-05T22:24:47.000Z (over 1 year ago)
- Last Synced: 2024-12-01T12:34:58.077Z (about 2 months ago)
- Language: JavaScript
- Size: 5.86 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Vite plugin for Elm Debug Transformer
[![npm version](https://badge.fury.io/js/vite-plugin-elm-debug-transformer.svg)](https://badge.fury.io/js/vite-plugin-elm-debug-transformer)
Vite plugin for adding [Elm Debug transformer](https://github.com/kraklin/elm-debug-transformer) to the index.html page on dev server.
## Installation
```
npm install -D vite-plugin-elm-debug-transformer elm-debug-transformer
```## Usage
In `vite.config.js` just import and use this plugin.
```js
import { defineConfig } from 'vite'
import plugin from 'vite-plugin-elm'
import transformer from 'vite-plugin-elm-debug-transformer'export default defineConfig({
plugins: [plugin(), transformer() ]
})
```## Options
Plugin is passing options to the [register](https://github.com/kraklin/elm-debug-transformer#options) function of the `elm-debug-transformer`.
| parameter | type | description | default value |
|---------------|---------|-------------------------------------------------------------------------------------------------------------------------------------------|----------------:|
| `limit` | number | number of message characters after which the parser won't parse the message. (Helpful for bypass the parsing of large datastructures) | `1 000 000` |
| `debug` | boolean | include original message and parser error with the message | `false` |
| `simple_mode` | boolean | force output to be in simple object format | `false` |
| `theme` | `light,dark` | sets theme colour of debug output. It is useful for switching on the dark mode of devtools. | `light` |