0.0.3 • Published 2 years ago

@lavinium/vite-plugin-melange v0.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Melange Vite Plugin

A simple vite plugin for building and hot reloading Reason files

About

This plugin is for developers who compile Reason using dune build. When running npm run dev vite will spawn a dune process and when dune rerenders changed files, vite will reflect those changes in the browser.

Usage

Add the melangePlugin to vite config and

// vite.config.js
import melangePlugin from '@lavinium/vite-plugin-melange';

export default defineConfig({
    return {
        plugins: [
            melangePlugin({
                src: 'src',
                target: 'output',
            })
        ],
    };
});

Import the Reason file you wish to use in your main application file.

// app.js
import 'app/main.re'
0.0.3

2 years ago

0.0.2

2 years ago